specSpec

package
v1.22.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Overview

because we need the yaml, this file is overwritten by hand :-(

Index

Constants

This section is empty.

Variables

View Source
var File_spec_spec_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

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"`
	// the field description
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description" yaml:"description"`
	// information for the proto generator, like number, type
	XProto *Fieldproto       `protobuf:"bytes,6,opt,name=__proto,json=Proto,proto3" json:"__proto" yaml:"__proto"`
	XUi    *Fielduiextension `protobuf:"bytes,7,opt,name=__ui,json=Ui,proto3" json:"__ui" yaml:"__ui"`
	// 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 */

	//
	Extensions *orderedmap.OrderedMap `json:"extensions,omitempty"  yaml:"extensions,omitempty"`
	// contains filtered or unexported fields
}

Defines a field in the furo spec

func (*Field) Descriptor deprecated

func (*Field) Descriptor() ([]byte, []int)

Deprecated: Use Field.ProtoReflect.Descriptor instead.

func (*Field) GetConstraints

func (x *Field) GetConstraints() map[string]*furo.FieldConstraint

func (*Field) GetDescription

func (x *Field) GetDescription() string

func (*Field) GetMeta

func (x *Field) GetMeta() *furo.FieldMeta

func (*Field) GetType

func (x *Field) GetType() string

func (*Field) GetXProto

func (x *Field) GetXProto() *Fieldproto

func (*Field) GetXUi

func (x *Field) GetXUi() *Fielduiextension

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) ProtoReflect

func (x *Field) ProtoReflect() protoreflect.Message

func (*Field) Reset

func (x *Field) Reset()

func (*Field) String

func (x *Field) String() string

type Fieldproto

type Fieldproto struct {

	// The field numbers are used to identify your fields in the message binary format, and should not be changed once your message type is in use.
	Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number"`
	// Assign field to a protobuf oneof group.
	Oneof string `protobuf:"bytes,3,opt,name=oneof,proto3" json:"oneof"`
	// contains filtered or unexported fields
}

Proto options for a field

func (*Fieldproto) Descriptor deprecated

func (*Fieldproto) Descriptor() ([]byte, []int)

Deprecated: Use Fieldproto.ProtoReflect.Descriptor instead.

func (*Fieldproto) GetNumber

func (x *Fieldproto) GetNumber() int32

func (*Fieldproto) GetOneof

func (x *Fieldproto) GetOneof() string

func (*Fieldproto) ProtoMessage

func (*Fieldproto) ProtoMessage()

func (*Fieldproto) ProtoReflect

func (x *Fieldproto) ProtoReflect() protoreflect.Message

func (*Fieldproto) Reset

func (x *Fieldproto) Reset()

func (*Fieldproto) String

func (x *Fieldproto) String() string

type Fielduiextension

type Fielduiextension struct {

	// component hint for ui-builder
	Component string `protobuf:"bytes,1,opt,name=component,proto3" json:"component"`
	// UI element flags like full, double, hidden,...
	Flags []string `protobuf:"bytes,2,rep,name=flags,proto3" json:"flags"`
	// Skip adding this field on ui init
	NoInit bool `protobuf:"varint,3,opt,name=no_init,json=noInit,proto3" json:"no_init"`
	// do not skip this field, even it is in the default skip list
	NoSkip bool `protobuf:"varint,4,opt,name=no_skip,json=noSkip,proto3" json:"no_skip"`
	// contains filtered or unexported fields
}

ui hints for a field

func (*Fielduiextension) Descriptor deprecated

func (*Fielduiextension) Descriptor() ([]byte, []int)

Deprecated: Use Fielduiextension.ProtoReflect.Descriptor instead.

func (*Fielduiextension) GetComponent

func (x *Fielduiextension) GetComponent() string

func (*Fielduiextension) GetFlags

func (x *Fielduiextension) GetFlags() []string

func (*Fielduiextension) GetNoInit

func (x *Fielduiextension) GetNoInit() bool

func (*Fielduiextension) GetNoSkip

func (x *Fielduiextension) GetNoSkip() bool

func (*Fielduiextension) ProtoMessage

func (*Fielduiextension) ProtoMessage()

func (*Fielduiextension) ProtoReflect

func (x *Fielduiextension) ProtoReflect() protoreflect.Message

func (*Fielduiextension) Reset

func (x *Fielduiextension) Reset()

func (*Fielduiextension) String

func (x *Fielduiextension) String() string

type Lifecycle

type Lifecycle struct {

	// Is this version deprecated
	Deprecated bool `protobuf:"varint,1,opt,name=deprecated,proto3" json:"deprecated"`
	// Inform about the replacement here, if you have one
	Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info"`
	// contains filtered or unexported fields
}

Lifecycle for a service

func (*Lifecycle) Descriptor deprecated

func (*Lifecycle) Descriptor() ([]byte, []int)

Deprecated: Use Lifecycle.ProtoReflect.Descriptor instead.

func (*Lifecycle) GetDeprecated

func (x *Lifecycle) GetDeprecated() bool

func (*Lifecycle) GetInfo

func (x *Lifecycle) GetInfo() string

func (*Lifecycle) ProtoMessage

func (*Lifecycle) ProtoMessage()

func (*Lifecycle) ProtoReflect

func (x *Lifecycle) ProtoReflect() protoreflect.Message

func (*Lifecycle) Reset

func (x *Lifecycle) Reset()

func (*Lifecycle) String

func (x *Lifecycle) String() string

type Queryparam

type Queryparam struct {

	// constraints for a field, like min{}, max{}, step{}. Not used at the moment
	Constraints map[string]*furo.FieldConstraint `` /* 163-byte string literal not displayed */
	// the field description
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// meta information for the client, like label, default, repeated, options...
	Meta *furo.FieldMeta `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"`
	// the field type, https://developers.google.com/protocol-buffers/docs/proto3#scalar
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Defines a queryparam field (for rpc type)

func (*Queryparam) Descriptor deprecated

func (*Queryparam) Descriptor() ([]byte, []int)

Deprecated: Use Queryparam.ProtoReflect.Descriptor instead.

func (*Queryparam) GetConstraints

func (x *Queryparam) GetConstraints() map[string]*furo.FieldConstraint

func (*Queryparam) GetDescription

func (x *Queryparam) GetDescription() string

func (*Queryparam) GetMeta

func (x *Queryparam) GetMeta() *furo.FieldMeta

func (*Queryparam) GetType

func (x *Queryparam) GetType() string

func (*Queryparam) ProtoMessage

func (*Queryparam) ProtoMessage()

func (*Queryparam) ProtoReflect

func (x *Queryparam) ProtoReflect() protoreflect.Message

func (*Queryparam) Reset

func (x *Queryparam) Reset()

func (*Queryparam) String

func (x *Queryparam) String() string

type Rpc

type Rpc struct {

	// the service description
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`

	// Request and response types for the service
	Data *Servicereqres `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// This data is needed for...
	Deeplink *Servicedeeplink `protobuf:"bytes,5,opt,name=deeplink,proto3" json:"deeplink,omitempty"`

	// Query params, it is recomended to use string types
	// was a map[string]*Queryparam
	Query *orderedmap.OrderedMap `` /* 151-byte string literal not displayed */
	// RPC name https://developers.google.com/protocol-buffers/docs/proto3#services
	RpcName    string                 `protobuf:"bytes,2,opt,name=rpc_name,json=rpcName,proto3" json:"rpc_name,omitempty"  yaml:"rpc_name,omitempty"`
	Extensions *orderedmap.OrderedMap `json:"extensions,omitempty"  yaml:"extensions,omitempty"`
	// contains filtered or unexported fields
}

Defines a rpc for a service

func (*Rpc) Descriptor deprecated

func (*Rpc) Descriptor() ([]byte, []int)

Deprecated: Use Md.ProtoReflect.Descriptor instead.

func (*Rpc) GetData

func (x *Rpc) GetData() *Servicereqres
func (x *Rpc) GetDeeplink() *Servicedeeplink

func (*Rpc) GetDescription

func (x *Rpc) GetDescription() string

func (*Rpc) GetQuery

func (x *Rpc) GetQuery() *orderedmap.OrderedMap

func (*Rpc) GetRpcName

func (x *Rpc) GetRpcName() string

func (*Rpc) ProtoMessage

func (*Rpc) ProtoMessage()

func (*Rpc) ProtoReflect

func (x *Rpc) ProtoReflect() protoreflect.Message

func (*Rpc) Reset

func (x *Rpc) Reset()

func (*Rpc) String

func (x *Rpc) String() string

type Service

type Service struct {
	// Describe the rpcs or so
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"`
	// The version number, use semver
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"`
	// Describe the rpcs or so
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description" yaml:"description"`
	//
	Lifecycle *Lifecycle `protobuf:"bytes,4,opt,name=lifecycle,proto3" json:"lifecycle" yaml:"lifecycle"`

	// information for the proto generator, should be removed for the client spec
	XProto *Typeproto `protobuf:"bytes,5,opt,name=__proto,json=Proto,proto3" json:"__proto" yaml:"__proto"`

	// RPCs for the service ==> will contains *Rpc
	Services   *orderedmap.OrderedMap `` /* 163-byte string literal not displayed */
	Extensions *orderedmap.OrderedMap `json:"extensions,omitempty"  yaml:"extensions,omitempty"`
	// contains filtered or unexported fields
}

Defines a service

func (*Service) Descriptor deprecated

func (*Service) Descriptor() ([]byte, []int)

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetDescription

func (x *Service) GetDescription() string

func (*Service) GetLifecycle

func (x *Service) GetLifecycle() *Lifecycle

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetServices

func (x *Service) GetServices() *orderedmap.OrderedMap

func (*Service) GetVersion

func (x *Service) GetVersion() string

func (*Service) GetXProto

func (x *Service) GetXProto() *Typeproto

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

func (x *Service) ProtoReflect() protoreflect.Message

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string
type Servicedeeplink struct {

	// Describe the query params
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// The link pattern, like /api/xxx/{qp}/yyy
	Href string `protobuf:"bytes,4,opt,name=href,proto3" json:"href,omitempty"`
	// method of curl
	Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
	// the relationship
	Rel string `protobuf:"bytes,2,opt,name=rel,proto3" json:"rel,omitempty"`
	// contains filtered or unexported fields
}

URL information for the service

func (*Servicedeeplink) Descriptor deprecated

func (*Servicedeeplink) Descriptor() ([]byte, []int)

Deprecated: Use Servicedeeplink.ProtoReflect.Descriptor instead.

func (*Servicedeeplink) GetDescription

func (x *Servicedeeplink) GetDescription() string

func (*Servicedeeplink) GetHref

func (x *Servicedeeplink) GetHref() string

func (*Servicedeeplink) GetMethod

func (x *Servicedeeplink) GetMethod() string

func (*Servicedeeplink) GetRel

func (x *Servicedeeplink) GetRel() string

func (*Servicedeeplink) ProtoMessage

func (*Servicedeeplink) ProtoMessage()

func (*Servicedeeplink) ProtoReflect

func (x *Servicedeeplink) ProtoReflect() protoreflect.Message

func (*Servicedeeplink) Reset

func (x *Servicedeeplink) Reset()

func (*Servicedeeplink) String

func (x *Servicedeeplink) String() string

type Servicereqres

type Servicereqres struct {

	// Define the request type, leave this field empty if not needed
	Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// Define the response type, leave this field empty if not needed
	Response string `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
	// Define the body field in request the type
	// The name of the request field whose value is mapped to the HTTP request
	// body, or `*` for mapping all request fields not captured by the path
	// pattern to the HTTP body, or omitted for not having any HTTP request body.
	//
	// NOTE: the referred field must be present at the top-level of the request
	// message type.
	BodyField string `protobuf:"bytes,3,opt,name=response,proto3" json:"bodyfield" yaml:"bodyfield"`
	// contains filtered or unexported fields
}

Repuest and response types for services, used in service.type

func (*Servicereqres) Descriptor deprecated

func (*Servicereqres) Descriptor() ([]byte, []int)

Deprecated: Use Servicereqres.ProtoReflect.Descriptor instead.

func (*Servicereqres) GetRequest

func (x *Servicereqres) GetRequest() string

func (*Servicereqres) GetResponse

func (x *Servicereqres) GetResponse() string

func (*Servicereqres) ProtoMessage

func (*Servicereqres) ProtoMessage()

func (*Servicereqres) ProtoReflect

func (x *Servicereqres) ProtoReflect() protoreflect.Message

func (*Servicereqres) Reset

func (x *Servicereqres) Reset()

func (*Servicereqres) String

func (x *Servicereqres) String() string

type SpecCollection

type SpecCollection struct {

	// Contains a spec.SpecEntity repeated
	Entities []*SpecEntity `protobuf:"bytes,4,rep,name=entities,proto3" json:"entities,omitempty"`
	// Hateoas links
	Links []*furo.Link `protobuf:"bytes,3,rep,name=links,proto3" json:"links,omitempty"`
	// Meta for the response
	Meta *furo.Meta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

SpecCollection with repeated SpecEntity

func (*SpecCollection) Descriptor deprecated

func (*SpecCollection) Descriptor() ([]byte, []int)

Deprecated: Use SpecCollection.ProtoReflect.Descriptor instead.

func (*SpecCollection) GetEntities

func (x *SpecCollection) GetEntities() []*SpecEntity
func (x *SpecCollection) GetLinks() []*furo.Link

func (*SpecCollection) GetMeta

func (x *SpecCollection) GetMeta() *furo.Meta

func (*SpecCollection) ProtoMessage

func (*SpecCollection) ProtoMessage()

func (*SpecCollection) ProtoReflect

func (x *SpecCollection) ProtoReflect() protoreflect.Message

func (*SpecCollection) Reset

func (x *SpecCollection) Reset()

func (*SpecCollection) String

func (x *SpecCollection) String() string

type SpecEntity

type SpecEntity struct {

	// contains a spec.Spec
	Data *Type `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// Hateoas links
	Links []*furo.Link `protobuf:"bytes,2,rep,name=links,proto3" json:"links,omitempty"`
	// Meta for the response
	Meta *furo.Meta `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

SpecEntity with Spec

func (*SpecEntity) Descriptor deprecated

func (*SpecEntity) Descriptor() ([]byte, []int)

Deprecated: Use SpecEntity.ProtoReflect.Descriptor instead.

func (*SpecEntity) GetData

func (x *SpecEntity) GetData() *Type
func (x *SpecEntity) GetLinks() []*furo.Link

func (*SpecEntity) GetMeta

func (x *SpecEntity) GetMeta() *furo.Meta

func (*SpecEntity) ProtoMessage

func (*SpecEntity) ProtoMessage()

func (*SpecEntity) ProtoReflect

func (x *SpecEntity) ProtoReflect() protoreflect.Message

func (*SpecEntity) Reset

func (x *SpecEntity) Reset()

func (*SpecEntity) String

func (x *SpecEntity) String() string

type SpecServiceEntity

type SpecServiceEntity struct {

	// contains a spec.Spec
	Data *Service `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// Hateoas links
	Links []*furo.Link `protobuf:"bytes,2,rep,name=links,proto3" json:"links,omitempty"`
	// Meta for the response
	Meta *furo.Meta `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

SpecEntity with Spec

func (*SpecServiceEntity) Descriptor deprecated

func (*SpecServiceEntity) Descriptor() ([]byte, []int)

Deprecated: Use SpecServiceEntity.ProtoReflect.Descriptor instead.

func (*SpecServiceEntity) GetData

func (x *SpecServiceEntity) GetData() *Service
func (x *SpecServiceEntity) GetLinks() []*furo.Link

func (*SpecServiceEntity) GetMeta

func (x *SpecServiceEntity) GetMeta() *furo.Meta

func (*SpecServiceEntity) ProtoMessage

func (*SpecServiceEntity) ProtoMessage()

func (*SpecServiceEntity) ProtoReflect

func (x *SpecServiceEntity) ProtoReflect() protoreflect.Message

func (*SpecServiceEntity) Reset

func (x *SpecServiceEntity) Reset()

func (*SpecServiceEntity) String

func (x *SpecServiceEntity) String() string

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"`
	// the type description
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description" yaml:"description"`
	// information for the proto generator, should be removed for the client spec
	XProto *Typeproto `protobuf:"bytes,4,opt,name=__proto,json=Proto,proto3" json:"__proto" yaml:"__proto"`

	// fields of a type (type is Field)
	Fields *orderedmap.OrderedMap `` /* 153-byte string literal not displayed */

	Extensions *orderedmap.OrderedMap `json:"extensions,omitempty"  yaml:"extensions,omitempty"`
	// contains filtered or unexported fields
}

Defines a type in the furo spec

func (*Type) Descriptor deprecated

func (*Type) Descriptor() ([]byte, []int)

Deprecated: Use TypeSpec.ProtoReflect.Descriptor instead.

func (*Type) GetDescription

func (x *Type) GetDescription() string

func (*Type) GetFields

func (x *Type) GetFields() *orderedmap.OrderedMap

func (*Type) GetName

func (x *Type) GetName() string

func (*Type) GetType

func (x *Type) GetType() string

func (*Type) GetXProto

func (x *Type) GetXProto() *Typeproto

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) ProtoReflect

func (x *Type) ProtoReflect() protoreflect.Message

func (*Type) Reset

func (x *Type) Reset()

func (*Type) String

func (x *Type) String() string

type Typeproto

type Typeproto struct {

	// the package this type belogs to
	Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package" yaml:"package"`
	// the target proto file for this type
	Targetfile string `protobuf:"bytes,3,opt,name=targetfile,proto3" json:"targetfile" yaml:"targetfile"`
	// needed imports like [ "spec/spec.proto", "google/protobuf/empty.proto" ]
	Imports []string `protobuf:"bytes,2,rep,name=imports,proto3" json:"imports" yaml:"imports"`
	// Proto options Todo: find a solution for boolean options
	Options map[string]string `` /* 160-byte string literal not displayed */
	// contains filtered or unexported fields
}

Main proto for a type

func (*Typeproto) Descriptor deprecated

func (*Typeproto) Descriptor() ([]byte, []int)

Deprecated: Use Typeproto.ProtoReflect.Descriptor instead.

func (*Typeproto) GetImports

func (x *Typeproto) GetImports() []string

func (*Typeproto) GetOptions

func (x *Typeproto) GetOptions() map[string]string

func (*Typeproto) GetPackage

func (x *Typeproto) GetPackage() string

func (*Typeproto) GetTargetfile

func (x *Typeproto) GetTargetfile() string

func (*Typeproto) ProtoMessage

func (*Typeproto) ProtoMessage()

func (*Typeproto) ProtoReflect

func (x *Typeproto) ProtoReflect() protoreflect.Message

func (*Typeproto) Reset

func (x *Typeproto) Reset()

func (*Typeproto) String

func (x *Typeproto) String() string

Directories

Path Synopsis
fat
google
protobuf
Package anypb contains generated types for google/protobuf/any.proto.
Package anypb contains generated types for google/protobuf/any.proto.

Jump to

Keyboard shortcuts

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