Documentation ¶
Overview ¶
Code generated by tars2go 1.2.3, DO NOT EDIT. This file was generated from AuthF.tars Package authf comment
Code generated by tars2go 1.2.3, DO NOT EDIT. This file was generated from AuthF.tars 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) ApplyToken(request *ApplyTokenRequest, opts ...map[string]string) (ApplyTokenResponse, error)
- func (obj *Auth) ApplyTokenOneWayWithContext(tarsCtx context.Context, request *ApplyTokenRequest, opts ...map[string]string) (ret ApplyTokenResponse, err error)
- func (obj *Auth) ApplyTokenWithContext(tarsCtx 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(tarsCtx context.Context, request *AuthRequest, opts ...map[string]string) (ret int32, err error)
- func (obj *Auth) AuthProcessWithContext(tarsCtx 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(tarsCtx context.Context, request *DeleteTokenRequest, ...) (ret int32, err error)
- func (obj *Auth) DeleteTokenWithContext(tarsCtx context.Context, request *DeleteTokenRequest, ...) (ret int32, err error)
- func (obj *Auth) Dispatch(tarsCtx context.Context, val interface{}, tarsReq *requestf.RequestPacket, ...) (err error)
- func (obj *Auth) Endpoints() []*endpoint.Endpoint
- func (obj *Auth) GetTokens(request *TokenRequest, opts ...map[string]string) ([]TokenResponse, error)
- func (obj *Auth) GetTokensOneWayWithContext(tarsCtx context.Context, request *TokenRequest, opts ...map[string]string) (ret []TokenResponse, err error)
- func (obj *Auth) GetTokensWithContext(tarsCtx context.Context, request *TokenRequest, opts ...map[string]string) (ret []TokenResponse, err error)
- func (obj *Auth) SetServant(servant model.Servant)
- func (obj *Auth) TarsSetProtocol(p model.Protocol)
- func (obj *Auth) TarsSetTimeout(timeout int)
- 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" tars:"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
type ApplyTokenResponse ¶
type ApplyTokenResponse struct { SKey TokenKey `json:"sKey" tars:"sKey,tag:1,require:true"` SToken string `json:"sToken" tars:"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
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth struct
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 tars file, with the context
func (*Auth) ApplyTokenOneWayWithContext ¶
func (obj *Auth) ApplyTokenOneWayWithContext(tarsCtx context.Context, request *ApplyTokenRequest, opts ...map[string]string) (ret ApplyTokenResponse, err error)
ApplyTokenOneWayWithContext is the proxy function for the method defined in the tars file, with the context
func (*Auth) ApplyTokenWithContext ¶
func (obj *Auth) ApplyTokenWithContext(tarsCtx context.Context, request *ApplyTokenRequest, opts ...map[string]string) (ret ApplyTokenResponse, err error)
ApplyTokenWithContext is the proxy function for the method defined in the tars file, with the context
func (*Auth) AuthProcess ¶
AuthProcess is the proxy function for the method defined in the tars file, with the context
func (*Auth) AuthProcessOneWayWithContext ¶
func (obj *Auth) AuthProcessOneWayWithContext(tarsCtx context.Context, request *AuthRequest, opts ...map[string]string) (ret int32, err error)
AuthProcessOneWayWithContext is the proxy function for the method defined in the tars file, with the context
func (*Auth) AuthProcessWithContext ¶
func (obj *Auth) AuthProcessWithContext(tarsCtx context.Context, request *AuthRequest, opts ...map[string]string) (ret int32, err error)
AuthProcessWithContext is the proxy function for the method defined in the tars file, with the context
func (*Auth) DeleteToken ¶
DeleteToken is the proxy function for the method defined in the tars file, with the context
func (*Auth) DeleteTokenOneWayWithContext ¶
func (obj *Auth) DeleteTokenOneWayWithContext(tarsCtx context.Context, request *DeleteTokenRequest, opts ...map[string]string) (ret int32, err error)
DeleteTokenOneWayWithContext is the proxy function for the method defined in the tars file, with the context
func (*Auth) DeleteTokenWithContext ¶
func (obj *Auth) DeleteTokenWithContext(tarsCtx context.Context, request *DeleteTokenRequest, opts ...map[string]string) (ret int32, err error)
DeleteTokenWithContext is the proxy function for the method defined in the tars file, with the context
func (*Auth) Dispatch ¶
func (obj *Auth) Dispatch(tarsCtx context.Context, val interface{}, tarsReq *requestf.RequestPacket, tarsResp *requestf.ResponsePacket, withContext bool) (err error)
Dispatch is used to call the server side implement for the method defined in the tars file. withContext shows using context or not.
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 tars file, with the context
func (*Auth) GetTokensOneWayWithContext ¶
func (obj *Auth) GetTokensOneWayWithContext(tarsCtx context.Context, request *TokenRequest, opts ...map[string]string) (ret []TokenResponse, err error)
GetTokensOneWayWithContext is the proxy function for the method defined in the tars file, with the context
func (*Auth) GetTokensWithContext ¶
func (obj *Auth) GetTokensWithContext(tarsCtx context.Context, request *TokenRequest, opts ...map[string]string) (ret []TokenResponse, err error)
GetTokensWithContext is the proxy function for the method defined in the tars file, with the context
func (*Auth) SetServant ¶
SetServant sets servant for the service.
func (*Auth) TarsSetProtocol ¶
TarsSetProtocol sets the protocol for the servant.
func (*Auth) TarsSetTimeout ¶
TarsSetTimeout sets the timeout for the servant which is in ms.
type AuthRequest ¶
type AuthRequest struct { SKey TokenKey `json:"sKey" tars:"sKey,tag:1,require:true"` SToken string `json:"sToken" tars:"sToken,tag:2,require:true"` }
AuthRequest struct implement
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
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(tarsCtx context.Context, request *AuthRequest) (ret int32, err error) GetTokens(tarsCtx context.Context, request *TokenRequest) (ret []TokenResponse, err error) ApplyToken(tarsCtx context.Context, request *ApplyTokenRequest) (ret ApplyTokenResponse, err error) DeleteToken(tarsCtx context.Context, request *DeleteTokenRequest) (ret int32, err error) }
type BasicAuthInfo ¶
type BasicAuthInfo struct { SObjName string `json:"sObjName" tars:"sObjName,tag:1,require:false"` SAccessKey string `json:"sAccessKey" tars:"sAccessKey,tag:2,require:false"` SSecretKey string `json:"sSecretKey" tars:"sSecretKey,tag:3,require:false"` SHashSecretKey2 string `json:"sHashSecretKey2" tars:"sHashSecretKey2,tag:4,require:false"` }
BasicAuthInfo struct implement
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
type BasicAuthPackage ¶
type BasicAuthPackage struct { SObjName string `json:"sObjName" tars:"sObjName,tag:1,require:true"` SAccessKey string `json:"sAccessKey" tars:"sAccessKey,tag:2,require:true"` ITime int64 `json:"iTime" tars:"iTime,tag:3,require:true"` SHashMethod string `json:"sHashMethod" tars:"sHashMethod,tag:4,require:false"` SSignature string `json:"sSignature" tars:"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
type DeleteTokenRequest ¶
type DeleteTokenRequest struct {
SKey TokenKey `json:"sKey" tars:"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
type TokenKey ¶
type TokenKey struct { SApplication string `json:"sApplication" tars:"sApplication,tag:1,require:true"` SServer string `json:"sServer" tars:"sServer,tag:2,require:true"` SObjName string `json:"sObjName" tars:"sObjName,tag:3,require:true"` }
TokenKey struct implement
func (*TokenKey) ResetDefault ¶
func (st *TokenKey) ResetDefault()
func (*TokenKey) WriteBlock ¶
WriteBlock encode struct
type TokenRequest ¶
type TokenRequest struct {
VObjName []string `json:"vObjName" tars:"vObjName,tag:1,require:true"`
}
TokenRequest struct implement
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
type TokenResponse ¶
type TokenResponse struct { SObjName string `json:"sObjName" tars:"sObjName,tag:1,require:true"` MTokens map[string]string `json:"mTokens" tars:"mTokens,tag:2,require:true"` }
TokenResponse struct implement
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