clientspec

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEnumsToResolver added in v1.33.0

func AddEnumsToResolver(tlist map[string]*enumAst.EnumAst)

func AddServicesToResolver

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

func AddTypesToResolver

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

func TransformCPlusStyleToAbsolutTypes

func TransformCPlusStyleToAbsolutTypes()

Types

type ClientServiceList

type ClientServiceList map[string]*Service

func GetAllServices

func GetAllServices() ClientServiceList

type ClientTypeList

type ClientTypeList map[string]*Type

func GetAllTypes

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 *specSpec.FieldMeta `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta" yaml:"meta"`
	// constraints for a field, like min{}, max{}, step{}
	Constraints map[string]*specSpec.FieldConstraint `` /* 165-byte string literal not displayed */
	// information for the proto generator, like number, type
	XProto *specSpec.Fieldproto `json:"__proto" yaml:"__proto"`
}

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

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,omitempty" 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 */
	// values for enum types
	Values *orderedmap.OrderedMap `` /* 153-byte string literal not displayed */
}

Defines a type in the furo env spec

func CreateClientTypeFromAstType

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

func CreateClientTypeFromEnum added in v1.33.0

func CreateClientTypeFromEnum(ast *specSpec.Enum) (t *Type)

Jump to

Keyboard shortcuts

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