Documentation
¶
Index ¶
- Constants
- type AuthTicket
- type AuthTicketHolder
- type Client
- type CodecProvider
- type Configuration
- type DefaultFunctionUrlProvider
- type Error
- type Function
- type FunctionCall
- type FunctionOutput
- type FunctionUrlProvider
- type HttpTransportProvider
- type JsonCodecProvider
- type TransientAuthTicketHolder
- type TransportProvider
Constants ¶
View Source
const ( ErrorEmpty = 0 ErrorFunctionNotCallable = -100 ErrorFunctionNotFound = -101 ErrorIncompatibleRPCVersion = -102 ErrorInvalidArguments = -200 ErrorEncode = -300 ErrorDecode = -301 ErrorCouldNotSendCall = -400 ErrorNotSuccessfulStatusCode = -401 ErrorServer = -500 ErrorAuth = -600 ErrorPreCallChecks = -700 )
View Source
const Version = "2.1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthTicket ¶
type AuthTicket struct {
AccessToken string `json:"accessToken"`
RefreshToken string `json:"refreshToken"`
}
func NewAuthTicket ¶
func NewAuthTicket(access, refresh string) AuthTicket
func (*AuthTicket) FromMap ¶
func (a *AuthTicket) FromMap(m map[string]interface{})
type AuthTicketHolder ¶
type AuthTicketHolder interface {
SetTicket(ticket AuthTicket)
GetTicket() AuthTicket
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(url string, configuration *Configuration) *Client
type CodecProvider ¶
type Configuration ¶
type Configuration struct {
TransportProvider TransportProvider
CodecProvider CodecProvider
FunctionUrlProvider FunctionUrlProvider
AuthTicketHolder AuthTicketHolder
}
func DefaultConfiguration ¶
func DefaultConfiguration() *Configuration
type DefaultFunctionUrlProvider ¶
type DefaultFunctionUrlProvider struct {
Prefix string
}
func NewDefaultFunctionUrlProvider ¶
func NewDefaultFunctionUrlProvider() *DefaultFunctionUrlProvider
func (*DefaultFunctionUrlProvider) GetUrl ¶
func (p *DefaultFunctionUrlProvider) GetUrl(functionName string) string
type Function ¶
type Function struct {
// contains filtered or unexported fields
}
func (*Function) Call ¶
func (f *Function) Call(args ...interface{}) (*FunctionOutput, error)
func (*Function) CallForResult ¶
type FunctionCall ¶
type FunctionCall struct {
Arguments []interface{} `json:"args"`
Auth string `json:"auth"`
}
type FunctionOutput ¶
type FunctionUrlProvider ¶
type HttpTransportProvider ¶
func NewHttpTransportProvider ¶
func NewHttpTransportProvider() *HttpTransportProvider
type JsonCodecProvider ¶
type JsonCodecProvider struct {
}
func NewJsonCodecProvider ¶
func NewJsonCodecProvider() *JsonCodecProvider
func (*JsonCodecProvider) ContentType ¶
func (j *JsonCodecProvider) ContentType() string
func (*JsonCodecProvider) Decode ¶
func (j *JsonCodecProvider) Decode(data []byte, destination interface{}) error
func (*JsonCodecProvider) Encode ¶
func (j *JsonCodecProvider) Encode(source interface{}) ([]byte, error)
type TransientAuthTicketHolder ¶
type TransientAuthTicketHolder struct {
// contains filtered or unexported fields
}
func NewTransientAuthTicketHolder ¶
func NewTransientAuthTicketHolder() *TransientAuthTicketHolder
func (*TransientAuthTicketHolder) GetTicket ¶
func (t *TransientAuthTicketHolder) GetTicket() AuthTicket
func (*TransientAuthTicketHolder) SetTicket ¶
func (t *TransientAuthTicketHolder) SetTicket(ticket AuthTicket)
Click to show internal directories.
Click to hide internal directories.