Documentation ¶
Overview ¶
Code generated by ksf2go 1.3.28, DO NOT EDIT. This file was generated from AuthF.ksf Package authf comment
Code generated by ksf2go 1.3.28, DO NOT EDIT. This file was generated from AuthF.ksf Package authf comment
Index ¶
- type AUTH_STATE
- type AUTH_TYPE
- type ApplyTokenRequest
- func (st *ApplyTokenRequest) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *ApplyTokenRequest) ReadFrom(readBuf *codec.Reader) error
- func (st *ApplyTokenRequest) ResetDefault()
- func (st *ApplyTokenRequest) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *ApplyTokenRequest) WriteTo(buf *codec.Buffer) (err error)
- type ApplyTokenResponse
- func (st *ApplyTokenResponse) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *ApplyTokenResponse) ReadFrom(readBuf *codec.Reader) error
- func (st *ApplyTokenResponse) ResetDefault()
- func (st *ApplyTokenResponse) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *ApplyTokenResponse) WriteTo(buf *codec.Buffer) (err error)
- type Auth
- func (obj *Auth) AllEndpoints() (active []*endpoint.Endpoint, inactive []*endpoint.Endpoint)
- func (obj *Auth) ApplyToken(request *ApplyTokenRequest, opts ...map[string]string) (ApplyTokenResponse, error)
- func (obj *Auth) ApplyTokenOneWayWithContext(ksfCtx context.Context, request *ApplyTokenRequest, opts ...map[string]string) (ret ApplyTokenResponse, err error)
- func (obj *Auth) ApplyTokenWithContext(ksfCtx context.Context, request *ApplyTokenRequest, opts ...map[string]string) (ret ApplyTokenResponse, err error)
- func (obj *Auth) AuthProcess(request *AuthRequest, opts ...map[string]string) (int32, error)
- func (obj *Auth) AuthProcessOneWayWithContext(ksfCtx context.Context, request *AuthRequest, opts ...map[string]string) (ret int32, err error)
- func (obj *Auth) AuthProcessWithContext(ksfCtx context.Context, request *AuthRequest, opts ...map[string]string) (ret int32, err error)
- func (obj *Auth) DeleteToken(request *DeleteTokenRequest, opts ...map[string]string) (int32, error)
- func (obj *Auth) DeleteTokenOneWayWithContext(ksfCtx context.Context, request *DeleteTokenRequest, opts ...map[string]string) (ret int32, err error)
- func (obj *Auth) DeleteTokenWithContext(ksfCtx context.Context, request *DeleteTokenRequest, opts ...map[string]string) (ret int32, err error)
- func (obj *Auth) Dispatch(ksfCtx context.Context, val interface{}, ksfReq *requestf.RequestPacket, ...) (err error)
- func (obj *Auth) Endpoints() (active []*endpoint.Endpoint)
- func (obj *Auth) GetServant() (servant *model.Servant)
- func (obj *Auth) GetTokens(request *TokenRequest, opts ...map[string]string) ([]TokenResponse, error)
- func (obj *Auth) GetTokensOneWayWithContext(ksfCtx context.Context, request *TokenRequest, opts ...map[string]string) (ret []TokenResponse, err error)
- func (obj *Auth) GetTokensWithContext(ksfCtx context.Context, request *TokenRequest, opts ...map[string]string) (ret []TokenResponse, err error)
- func (obj *Auth) KsfPing() error
- func (obj *Auth) KsfPingWithContext(ksfCtx context.Context) error
- func (obj *Auth) KsfSetProtocol(p model.Protocol)
- func (obj *Auth) KsfSetTimeout(timeout int)
- func (obj *Auth) KsfSetVersion(version int16)
- func (obj *Auth) SetOnCloseCallback(callback func(string))
- func (obj *Auth) SetOnConnectCallback(callback func(string))
- func (obj *Auth) SetPushCallback(callback func([]byte))
- func (obj *Auth) SetServant(servant model.Servant)
- type AuthRequest
- func (st *AuthRequest) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *AuthRequest) ReadFrom(readBuf *codec.Reader) error
- func (st *AuthRequest) ResetDefault()
- func (st *AuthRequest) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *AuthRequest) WriteTo(buf *codec.Buffer) (err error)
- type AuthServant
- type AuthServantWithContext
- type BasicAuthInfo
- func (st *BasicAuthInfo) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *BasicAuthInfo) ReadFrom(readBuf *codec.Reader) error
- func (st *BasicAuthInfo) ResetDefault()
- func (st *BasicAuthInfo) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *BasicAuthInfo) WriteTo(buf *codec.Buffer) (err error)
- type BasicAuthPackage
- func (st *BasicAuthPackage) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *BasicAuthPackage) ReadFrom(readBuf *codec.Reader) error
- func (st *BasicAuthPackage) ResetDefault()
- func (st *BasicAuthPackage) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *BasicAuthPackage) WriteTo(buf *codec.Buffer) (err error)
- type DeleteTokenRequest
- func (st *DeleteTokenRequest) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *DeleteTokenRequest) ReadFrom(readBuf *codec.Reader) error
- func (st *DeleteTokenRequest) ResetDefault()
- func (st *DeleteTokenRequest) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *DeleteTokenRequest) WriteTo(buf *codec.Buffer) (err error)
- type TokenKey
- func (st *TokenKey) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *TokenKey) ReadFrom(readBuf *codec.Reader) error
- func (st *TokenKey) ResetDefault()
- func (st *TokenKey) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *TokenKey) WriteTo(buf *codec.Buffer) (err error)
- type TokenRequest
- func (st *TokenRequest) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *TokenRequest) ReadFrom(readBuf *codec.Reader) error
- func (st *TokenRequest) ResetDefault()
- func (st *TokenRequest) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *TokenRequest) WriteTo(buf *codec.Buffer) (err error)
- type TokenResponse
- func (st *TokenResponse) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error
- func (st *TokenResponse) ReadFrom(readBuf *codec.Reader) error
- func (st *TokenResponse) ResetDefault()
- func (st *TokenResponse) WriteBlock(buf *codec.Buffer, tag byte) error
- func (st *TokenResponse) WriteTo(buf *codec.Buffer) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AUTH_STATE ¶
type AUTH_STATE int32
const ( AUTH_STATE_AUTH_INIT AUTH_STATE = -127 AUTH_STATE_AUTH_SUCC AUTH_STATE = 0 AUTH_STATE_AUTH_PROTO_ERR AUTH_STATE = -100 AUTH_STATE_AUTH_WRONG_OBJ AUTH_STATE = -101 AUTH_STATE_AUTH_WRONG_AK AUTH_STATE = -102 AUTH_STATE_AUTH_WRONG_TIME AUTH_STATE = -103 AUTH_STATE_AUTH_NOT_SUPPORT_ENC AUTH_STATE = -104 AUTH_STATE_AUTH_DEC_FAIL AUTH_STATE = -105 AUTH_STATE_AUTH_ERROR AUTH_STATE = -106 )
type ApplyTokenRequest ¶
type ApplyTokenRequest struct {
SKey TokenKey `json:"sKey" ksf:"sKey,tag:1,require:true"`
}
ApplyTokenRequest struct implement
func (*ApplyTokenRequest) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*ApplyTokenRequest) ReadFrom ¶
func (st *ApplyTokenRequest) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*ApplyTokenRequest) ResetDefault ¶
func (st *ApplyTokenRequest) ResetDefault()
func (*ApplyTokenRequest) WriteBlock ¶
func (st *ApplyTokenRequest) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*ApplyTokenRequest) WriteTo ¶
func (st *ApplyTokenRequest) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type ApplyTokenResponse ¶
type ApplyTokenResponse struct { SKey TokenKey `json:"sKey" ksf:"sKey,tag:1,require:true"` SToken string `json:"sToken" ksf:"sToken,tag:2,require:true"` }
ApplyTokenResponse struct implement
func (*ApplyTokenResponse) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*ApplyTokenResponse) ReadFrom ¶
func (st *ApplyTokenResponse) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*ApplyTokenResponse) ResetDefault ¶
func (st *ApplyTokenResponse) ResetDefault()
func (*ApplyTokenResponse) WriteBlock ¶
func (st *ApplyTokenResponse) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*ApplyTokenResponse) WriteTo ¶
func (st *ApplyTokenResponse) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth struct
func (*Auth) AllEndpoints ¶ added in v1.4.39
Endpoints returns all endpoint.Endpoint
func (*Auth) ApplyToken ¶
func (obj *Auth) ApplyToken(request *ApplyTokenRequest, opts ...map[string]string) (ApplyTokenResponse, error)
ApplyToken is the proxy function for the method defined in the ksf file, with the context
func (*Auth) ApplyTokenOneWayWithContext ¶
func (obj *Auth) ApplyTokenOneWayWithContext(ksfCtx context.Context, request *ApplyTokenRequest, opts ...map[string]string) (ret ApplyTokenResponse, err error)
ApplyTokenOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Auth) ApplyTokenWithContext ¶
func (obj *Auth) ApplyTokenWithContext(ksfCtx context.Context, request *ApplyTokenRequest, opts ...map[string]string) (ret ApplyTokenResponse, err error)
ApplyTokenWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Auth) AuthProcess ¶
AuthProcess is the proxy function for the method defined in the ksf file, with the context
func (*Auth) AuthProcessOneWayWithContext ¶
func (obj *Auth) AuthProcessOneWayWithContext(ksfCtx context.Context, request *AuthRequest, opts ...map[string]string) (ret int32, err error)
AuthProcessOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Auth) AuthProcessWithContext ¶
func (obj *Auth) AuthProcessWithContext(ksfCtx context.Context, request *AuthRequest, opts ...map[string]string) (ret int32, err error)
AuthProcessWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Auth) DeleteToken ¶
DeleteToken is the proxy function for the method defined in the ksf file, with the context
func (*Auth) DeleteTokenOneWayWithContext ¶
func (obj *Auth) DeleteTokenOneWayWithContext(ksfCtx context.Context, request *DeleteTokenRequest, opts ...map[string]string) (ret int32, err error)
DeleteTokenOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Auth) DeleteTokenWithContext ¶
func (obj *Auth) DeleteTokenWithContext(ksfCtx context.Context, request *DeleteTokenRequest, opts ...map[string]string) (ret int32, err error)
DeleteTokenWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Auth) Dispatch ¶
func (obj *Auth) Dispatch(ksfCtx context.Context, val interface{}, ksfReq *requestf.RequestPacket, ksfResp *requestf.ResponsePacket, withContext bool) (err error)
Dispatch is used to call the server side implement for the method defined in the ksf file. withContext shows using context or not.
func (*Auth) Endpoints ¶
Endpoints returns all active endpoint.Endpoint
func (*Auth) GetServant ¶
GetServant gets servant for the service.
func (*Auth) GetTokens ¶
func (obj *Auth) GetTokens(request *TokenRequest, opts ...map[string]string) ([]TokenResponse, error)
GetTokens is the proxy function for the method defined in the ksf file, with the context
func (*Auth) GetTokensOneWayWithContext ¶
func (obj *Auth) GetTokensOneWayWithContext(ksfCtx context.Context, request *TokenRequest, opts ...map[string]string) (ret []TokenResponse, err error)
GetTokensOneWayWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Auth) GetTokensWithContext ¶
func (obj *Auth) GetTokensWithContext(ksfCtx context.Context, request *TokenRequest, opts ...map[string]string) (ret []TokenResponse, err error)
GetTokensWithContext is the proxy function for the method defined in the ksf file, with the context
func (*Auth) KsfPingWithContext ¶
KsfPingWithContext
func (*Auth) KsfSetProtocol ¶
KsfSetProtocol sets the protocol for the servant.
func (*Auth) KsfSetTimeout ¶
KsfSetTimeout sets the timeout for the servant which is in ms.
func (*Auth) KsfSetVersion ¶ added in v1.4.46
KsfSetVersion default as KSFVERSION,you can set JSONVERSION.
func (*Auth) SetOnCloseCallback ¶
SetOnCloseCallback
func (*Auth) SetOnConnectCallback ¶
SetOnConnectCallback
func (*Auth) SetPushCallback ¶
SetPushCallback
type AuthRequest ¶
type AuthRequest struct { SKey TokenKey `json:"sKey" ksf:"sKey,tag:1,require:true"` SToken string `json:"sToken" ksf:"sToken,tag:2,require:true"` }
AuthRequest struct implement
func (*AuthRequest) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*AuthRequest) ReadFrom ¶
func (st *AuthRequest) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*AuthRequest) ResetDefault ¶
func (st *AuthRequest) ResetDefault()
func (*AuthRequest) WriteBlock ¶
func (st *AuthRequest) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*AuthRequest) WriteTo ¶
func (st *AuthRequest) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type AuthServant ¶
type AuthServant interface { AuthProcess(request *AuthRequest) (ret int32, err error) GetTokens(request *TokenRequest) (ret []TokenResponse, err error) ApplyToken(request *ApplyTokenRequest) (ret ApplyTokenResponse, err error) DeleteToken(request *DeleteTokenRequest) (ret int32, err error) }
type AuthServantWithContext ¶
type AuthServantWithContext interface { AuthProcess(ksfCtx context.Context, request *AuthRequest) (ret int32, err error) GetTokens(ksfCtx context.Context, request *TokenRequest) (ret []TokenResponse, err error) ApplyToken(ksfCtx context.Context, request *ApplyTokenRequest) (ret ApplyTokenResponse, err error) DeleteToken(ksfCtx context.Context, request *DeleteTokenRequest) (ret int32, err error) DoClose(ctx context.Context) }
type BasicAuthInfo ¶
type BasicAuthInfo struct { SObjName string `json:"sObjName" ksf:"sObjName,tag:1,require:false"` SAccessKey string `json:"sAccessKey" ksf:"sAccessKey,tag:2,require:false"` SSecretKey string `json:"sSecretKey" ksf:"sSecretKey,tag:3,require:false"` SHashSecretKey2 string `json:"sHashSecretKey2" ksf:"sHashSecretKey2,tag:4,require:false"` }
BasicAuthInfo struct implement
func (*BasicAuthInfo) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*BasicAuthInfo) ReadFrom ¶
func (st *BasicAuthInfo) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*BasicAuthInfo) ResetDefault ¶
func (st *BasicAuthInfo) ResetDefault()
func (*BasicAuthInfo) WriteBlock ¶
func (st *BasicAuthInfo) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*BasicAuthInfo) WriteTo ¶
func (st *BasicAuthInfo) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type BasicAuthPackage ¶
type BasicAuthPackage struct { SObjName string `json:"sObjName" ksf:"sObjName,tag:1,require:true"` SAccessKey string `json:"sAccessKey" ksf:"sAccessKey,tag:2,require:true"` ITime int64 `json:"iTime" ksf:"iTime,tag:3,require:true"` SHashMethod string `json:"sHashMethod" ksf:"sHashMethod,tag:4,require:false"` SSignature string `json:"sSignature" ksf:"sSignature,tag:5,require:false"` }
BasicAuthPackage struct implement
func (*BasicAuthPackage) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*BasicAuthPackage) ReadFrom ¶
func (st *BasicAuthPackage) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*BasicAuthPackage) ResetDefault ¶
func (st *BasicAuthPackage) ResetDefault()
func (*BasicAuthPackage) WriteBlock ¶
func (st *BasicAuthPackage) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*BasicAuthPackage) WriteTo ¶
func (st *BasicAuthPackage) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type DeleteTokenRequest ¶
type DeleteTokenRequest struct {
SKey TokenKey `json:"sKey" ksf:"sKey,tag:1,require:true"`
}
DeleteTokenRequest struct implement
func (*DeleteTokenRequest) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*DeleteTokenRequest) ReadFrom ¶
func (st *DeleteTokenRequest) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*DeleteTokenRequest) ResetDefault ¶
func (st *DeleteTokenRequest) ResetDefault()
func (*DeleteTokenRequest) WriteBlock ¶
func (st *DeleteTokenRequest) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*DeleteTokenRequest) WriteTo ¶
func (st *DeleteTokenRequest) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type TokenKey ¶
type TokenKey struct { SApplication string `json:"sApplication" ksf:"sApplication,tag:1,require:true"` SServer string `json:"sServer" ksf:"sServer,tag:2,require:true"` SObjName string `json:"sObjName" ksf:"sObjName,tag:3,require:true"` }
TokenKey struct implement
func (*TokenKey) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*TokenKey) ReadFrom ¶
ReadFrom reads from readBuf and put into struct.
func (*TokenKey) WriteBlock ¶
WriteBlock encode struct
type TokenRequest ¶
type TokenRequest struct {
VObjName []string `json:"vObjName" ksf:"vObjName,tag:1,require:true"`
}
TokenRequest struct implement
func (*TokenRequest) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*TokenRequest) ReadFrom ¶
func (st *TokenRequest) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*TokenRequest) ResetDefault ¶
func (st *TokenRequest) ResetDefault()
func (*TokenRequest) WriteBlock ¶
func (st *TokenRequest) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*TokenRequest) WriteTo ¶
func (st *TokenRequest) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer
type TokenResponse ¶
type TokenResponse struct { SObjName string `json:"sObjName" ksf:"sObjName,tag:1,require:true"` MTokens map[string]string `json:"mTokens" ksf:"mTokens,tag:2,require:true"` }
TokenResponse struct implement
func (*TokenResponse) ReadBlock ¶
ReadBlock reads struct from the given tag , require or optional.
func (*TokenResponse) ReadFrom ¶
func (st *TokenResponse) ReadFrom(readBuf *codec.Reader) error
ReadFrom reads from readBuf and put into struct.
func (*TokenResponse) ResetDefault ¶
func (st *TokenResponse) ResetDefault()
func (*TokenResponse) WriteBlock ¶
func (st *TokenResponse) WriteBlock(buf *codec.Buffer, tag byte) error
WriteBlock encode struct
func (*TokenResponse) WriteTo ¶
func (st *TokenResponse) WriteTo(buf *codec.Buffer) (err error)
WriteTo encode struct to buffer