Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FullServiceDefinition ¶
type FullServiceDefinition struct { Parameters map[string]string `json:"parameters"` ServiceDefinition }
FullServiceDefinition is the describer of service definition with parameters
func BuildFullDefinition ¶ added in v3.0.4
func BuildFullDefinition(service common.Service, url *common.URL) *FullServiceDefinition
BuildFullDefinition can build service definition with full url parameters
func (*FullServiceDefinition) String ¶ added in v3.0.4
func (def *FullServiceDefinition) String() string
String will iterate all methods and parameters and convert them to json string
func (*FullServiceDefinition) ToBytes ¶ added in v3.0.4
func (def *FullServiceDefinition) ToBytes() ([]byte, error)
ToBytes convert ServiceDefinition to json string
type MethodDefinition ¶
type MethodDefinition struct { Name string `json:"name"` ParameterTypes []string `json:"parameterTypes"` ReturnType string `json:"returnType"` Parameters []TypeDefinition `json:"parameters"` }
MethodDefinition is the describer of method definition
type ServiceDefiner ¶
ServiceDefiner is a interface of service's definition
type ServiceDefinition ¶
type ServiceDefinition struct { CanonicalName string `json:"canonicalName"` CodeSource string `json:"codeSource"` Methods []MethodDefinition `json:"methods"` Types []TypeDefinition `json:"types"` }
ServiceDefinition is the describer of service definition
func BuildServiceDefinition ¶
func BuildServiceDefinition(service common.Service, url *common.URL) *ServiceDefinition
BuildServiceDefinition can build service definition which will be used to describe a service
func (*ServiceDefinition) String ¶
func (def *ServiceDefinition) String() string
String will iterate all methods and parameters and convert them to json string
func (*ServiceDefinition) ToBytes ¶
func (def *ServiceDefinition) ToBytes() ([]byte, error)
ToBytes convert ServiceDefinition to json string
type TypeDefinition ¶
type TypeDefinition struct { ID string `json:"id"` Type string `json:"type"` Items []TypeDefinition `json:"items"` Enums []string `json:"enums"` Properties map[string]TypeDefinition `json:"properties"` TypeBuilderName string `json:"typeBuilderName"` }
TypeDefinition is the describer of type definition
type User ¶
func (User) JavaClassName ¶
type UserProvider ¶
type UserProvider struct{}
func (*UserProvider) GetUser ¶
func (u *UserProvider) GetUser(ctx context.Context, req []interface{}) (*User, error)
func (*UserProvider) Reference ¶
func (u *UserProvider) Reference() string