definition

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceDescriperBuild

func ServiceDescriperBuild(serviceName string, group string, version string) string

ServiceDescriperBuild: build the service key, format is `group/serviceName:version` which be same as URL's service key

Types

type FullServiceDefinition

type FullServiceDefinition struct {
	ServiceDefinition
	Params map[string]string
}

FullServiceDefinition is the describer of service definition with parameters

type MethodDefinition

type MethodDefinition struct {
	Name           string
	ParameterTypes []string
	ReturnType     string
	Parameters     []TypeDefinition
}

MethodDefinition is the describer of method definition

type ServiceDefiner

type ServiceDefiner interface {
	ToBytes() ([]byte, error)
}

ServiceDefiner is a interface of service's definition

type ServiceDefinition

type ServiceDefinition struct {
	CanonicalName string
	CodeSource    string
	Methods       []MethodDefinition
	Types         []TypeDefinition
}

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
	Type            string
	Items           []TypeDefinition
	Enums           []string
	Properties      map[string]TypeDefinition
	TypeBuilderName string
}

TypeDefinition is the describer of type definition

type User

type User struct {
	Id   string
	Name string
	Age  int32
	Time time.Time
}

func (User) JavaClassName

func (u User) JavaClassName() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL