clientspec

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddServicesToResolver added in v1.5.0

func AddServicesToResolver(slist map[string]*serviceAst.ServiceAst)

func AddTypesToResolver added in v1.5.0

func AddTypesToResolver(tlist map[string]*typeAst.TypeAst)

func TransformCPlusStyleToAbsolutTypes added in v1.5.0

func TransformCPlusStyleToAbsolutTypes()

Types

type ClientServiceList added in v1.5.0

type ClientServiceList map[string]*Service

func GetAllServices added in v1.5.0

func GetAllServices() ClientServiceList

type ClientTypeList added in v1.5.0

type ClientTypeList map[string]*Type

func GetAllTypes added in v1.5.0

func GetAllTypes() ClientTypeList

type CompressedService

type CompressedService struct {
	Data     *specSpec.Servicereqres `json:"data,omitempty" yaml:"data,omitempty"`
	Deeplink *Deeplink               `json:"deeplink,omitempty" yaml:"deeplink,omitempty"`
	Query    *orderedmap.OrderedMap  `json:"query,omitempty" yaml:"query,omitempty"`
}
type Deeplink struct {
	// The link pattern, like /api/xxx/{qp}/yyy
	Href string `json:"href,omitempty" yaml:"href,omitempty"`
	// method of curl
	Method string `json:"method,omitempty" yaml:"method,omitempty"`
	// the relationship
	Rel string `json:"rel,omitempty" yaml:"rel,omitempty"`
}

type Field

type Field struct {
	// the field type, https://developers.google.com/protocol-buffers/docs/proto3#scalar
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type" yaml:"type"`
	// meta information for the client, like label, default, repeated, options...
	Meta *furo.FieldMeta `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta" yaml:"meta"`
	// constraints for a field, like min{}, max{}, step{}
	Constraints map[string]*furo.FieldConstraint `` /* 165-byte string literal not displayed */
}

type Service

type Service struct {
	// Name of the type
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"`

	// services => which is a CompressedService
	Services *orderedmap.OrderedMap `json:"services" yaml:"services" `
}

func CreateServiceFromAstService added in v1.5.0

func CreateServiceFromAstService(ast *specSpec.Service, fullname string) (t *Service)

type Type

type Type struct {
	// Name of the type
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"`
	// the type
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type" yaml:"type"`
	// fields of a type
	Fields *orderedmap.OrderedMap `` /* 153-byte string literal not displayed */
}

Defines a type in the furo env spec

func CreateClientTypeFromAstType added in v1.5.0

func CreateClientTypeFromAstType(ast *specSpec.Type) (t *Type)

Jump to

Keyboard shortcuts

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