Documentation ¶
Index ¶
- Constants
- func Critical(ctx context.Context, format string, v ...interface{})
- func Debug(ctx context.Context, format string, v ...interface{})
- func Error(ctx context.Context, format string, v ...interface{})
- func Info(ctx context.Context, format string, v ...interface{})
- func SetLevelByString(level string)
- func SetOutput(output io.Writer)
- func Warn(ctx context.Context, format string, v ...interface{})
- type AuthRequest
- type AuthResponse
- type CmdRequest
- type CmdResponse
- type CtrlRequest
- type CtrlResponse
- type DataRequest
- type DataResponse
- type Level
- type Logger
- func (logger *Logger) Critical(ctx context.Context, format string, args ...interface{})
- func (logger *Logger) Debug(ctx context.Context, format string, args ...interface{})
- func (logger *Logger) Error(ctx context.Context, format string, args ...interface{})
- func (logger *Logger) HideCallstack() *Logger
- func (logger *Logger) Info(ctx context.Context, format string, args ...interface{})
- func (logger *Logger) SetLevel(level Level)
- func (logger *Logger) SetLevelByString(level string)
- func (logger *Logger) SetOutput(output io.Writer) *Logger
- func (logger *Logger) Warn(ctx context.Context, format string, args ...interface{})
- func (logger *Logger) WithDepth(depth int) *Logger
- type RnDC
- type Serializable
Constants ¶
View Source
const (
ProtocolVersion = 1
)
Variables ¶
This section is empty.
Functions ¶
func SetLevelByString ¶ added in v0.0.2
func SetLevelByString(level string)
Types ¶
type AuthRequest ¶
func (*AuthRequest) Serialize ¶
func (s *AuthRequest) Serialize() ([]byte, error)
type AuthResponse ¶
func (*AuthResponse) DeSerialize ¶
func (r *AuthResponse) DeSerialize(input []byte) error
type CmdRequest ¶
type CmdRequest struct { Auth *AuthRequest `json:"_auth,omitempty"` Ctrl *CtrlRequest `json:"_ctrl"` Data *DataRequest `json:"_data"` }
func (*CmdRequest) Serialize ¶
func (s *CmdRequest) Serialize() ([]byte, error)
type CmdResponse ¶
type CmdResponse struct { Auth *AuthResponse `json:"_auth"` Ctrl *CtrlResponse `json:"_ctrl"` Data *DataResponse `json:"_data"` }
func (*CmdResponse) DeSerialize ¶
func (r *CmdResponse) DeSerialize(input []byte) error
type CtrlRequest ¶
type CtrlRequest struct { Ser string `json:"_ser"` Tim string `json:"_tim"` Exp string `json:"_exp"` Nonce string `json:"_nonce,omitempty"` }
func (*CtrlRequest) Serialize ¶
func (c *CtrlRequest) Serialize() ([]byte, error)
type CtrlResponse ¶
type CtrlResponse struct { Ser string `json:"_ser"` Tim string `json:"_tim"` Exp string `json:"_exp"` Rpl string `json:"_rpl"` Nonce string `json:"_nonce,omitempty"` }
func (*CtrlResponse) DeSerialize ¶
func (r *CtrlResponse) DeSerialize(input []byte) error
type DataRequest ¶
type DataRequest struct {
Type string `json:"type"`
}
func (*DataRequest) Serialize ¶
func (s *DataRequest) Serialize() ([]byte, error)
type DataResponse ¶
type DataResponse struct { Type string `json:"type"` Result string `json:"result"` Err string `json:"err"` Text string `json:"text"` }
func (*DataResponse) DeSerialize ¶
func (r *DataResponse) DeSerialize(input []byte) error
type Logger ¶ added in v0.0.2
type Logger struct { Level Level // contains filtered or unexported fields }
func (*Logger) HideCallstack ¶ added in v0.0.2
func (*Logger) SetLevelByString ¶ added in v0.0.2
type RnDC ¶
type RnDC struct {
// contains filtered or unexported fields
}
func NewRNDCClient ¶
NewRNDCClient create rndc client host - (ip, port) tuple algo - HMAC algorithm: one of md5, sha1, sha224, sha256, sha384, sha512
(with optional prefix 'hmac-')
secret - HMAC secret, base64 encoded
type Serializable ¶
Click to show internal directories.
Click to hide internal directories.