schema

package
v0.0.0-...-a521231 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "STRING",
		2: "INT32",
		3: "INT64",
		4: "DOUBLE",
		5: "FLOAT",
		6: "BOOLEAN",
	}
	Type_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"STRING":           1,
		"INT32":            2,
		"INT64":            3,
		"DOUBLE":           4,
		"FLOAT":            5,
		"BOOLEAN":          6,
	}
)

Enum value maps for Type.

View Source
var (
	Methods_CustomMethod_MethodType_name = map[int32]string{
		0: "METHOD_TYPE_UNSPECIFIED",
		1: "GET",
		2: "POST",
	}
	Methods_CustomMethod_MethodType_value = map[string]int32{
		"METHOD_TYPE_UNSPECIFIED": 0,
		"GET":                     1,
		"POST":                    2,
	}
)

Enum value maps for Methods_CustomMethod_MethodType.

View Source
var File_schema_resourcedefinition_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ArrayType

type ArrayType struct {

	// Types that are assignable to ArrayDetails:
	//
	//	*ArrayType_Type
	//	*ArrayType_ObjectType
	ArrayDetails isArrayType_ArrayDetails `protobuf_oneof:"array_details"`
	// contains filtered or unexported fields
}

func (*ArrayType) Descriptor deprecated

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

Deprecated: Use ArrayType.ProtoReflect.Descriptor instead.

func (*ArrayType) GetArrayDetails

func (m *ArrayType) GetArrayDetails() isArrayType_ArrayDetails

func (*ArrayType) GetObjectType

func (x *ArrayType) GetObjectType() *ObjectType

func (*ArrayType) GetType

func (x *ArrayType) GetType() Type

func (*ArrayType) ProtoMessage

func (*ArrayType) ProtoMessage()

func (*ArrayType) ProtoReflect

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

func (*ArrayType) Reset

func (x *ArrayType) Reset()

func (*ArrayType) String

func (x *ArrayType) String() string

type ArrayType_ObjectType

type ArrayType_ObjectType struct {
	ObjectType *ObjectType `protobuf:"bytes,2,opt,name=object_type,json=objectType,proto3,oneof"`
}

type ArrayType_Type

type ArrayType_Type struct {
	Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=Type,oneof"`
}

type Methods

type Methods struct {

	// Specific properties of the create method for the resource.
	Create *Methods_CreateMethod `protobuf:"bytes,1,opt,name=create,proto3" json:"create,omitempty"`
	// Specific properties of the read method for the resource.
	Read *Methods_ReadMethod `protobuf:"bytes,2,opt,name=read,proto3" json:"read,omitempty"`
	// Specific properties of the update method for the resource.
	Update *Methods_UpdateMethod `protobuf:"bytes,3,opt,name=update,proto3" json:"update,omitempty"`
	// Specific properties of the delete emethod for the resource.
	Delete *Methods_DeleteMethod `protobuf:"bytes,4,opt,name=delete,proto3" json:"delete,omitempty"`
	// Specific properties of the list for the resource.
	List *Methods_ListMethod `protobuf:"bytes,5,opt,name=list,proto3" json:"list,omitempty"`
	// Specific properties of the global_list for the resource.
	GlobalList *Methods_GlobalListMethod `protobuf:"bytes,6,opt,name=global_list,json=globalList,proto3" json:"global_list,omitempty"`
	// Specific properties of the apply for the resource.
	Apply  *Methods_ApplyMethod    `protobuf:"bytes,7,opt,name=apply,proto3" json:"apply,omitempty"`
	Custom []*Methods_CustomMethod `protobuf:"bytes,8,rep,name=custom,proto3" json:"custom,omitempty"`
	// contains filtered or unexported fields
}

Methods supported by a resource.

func (*Methods) Descriptor deprecated

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

Deprecated: Use Methods.ProtoReflect.Descriptor instead.

func (*Methods) GetApply

func (x *Methods) GetApply() *Methods_ApplyMethod

func (*Methods) GetCreate

func (x *Methods) GetCreate() *Methods_CreateMethod

func (*Methods) GetCustom

func (x *Methods) GetCustom() []*Methods_CustomMethod

func (*Methods) GetDelete

func (x *Methods) GetDelete() *Methods_DeleteMethod

func (*Methods) GetGlobalList

func (x *Methods) GetGlobalList() *Methods_GlobalListMethod

func (*Methods) GetList

func (x *Methods) GetList() *Methods_ListMethod

func (*Methods) GetRead

func (x *Methods) GetRead() *Methods_ReadMethod

func (*Methods) GetUpdate

func (x *Methods) GetUpdate() *Methods_UpdateMethod

func (*Methods) ProtoMessage

func (*Methods) ProtoMessage()

func (*Methods) ProtoReflect

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

func (*Methods) Reset

func (x *Methods) Reset()

func (*Methods) String

func (x *Methods) String() string

type Methods_ApplyMethod

type Methods_ApplyMethod struct {
	// contains filtered or unexported fields
}

The properties of the apply method.

func (*Methods_ApplyMethod) Descriptor deprecated

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

Deprecated: Use Methods_ApplyMethod.ProtoReflect.Descriptor instead.

func (*Methods_ApplyMethod) ProtoMessage

func (*Methods_ApplyMethod) ProtoMessage()

func (*Methods_ApplyMethod) ProtoReflect

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

func (*Methods_ApplyMethod) Reset

func (x *Methods_ApplyMethod) Reset()

func (*Methods_ApplyMethod) String

func (x *Methods_ApplyMethod) String() string

type Methods_CreateMethod

type Methods_CreateMethod struct {
	NonClientSettableId bool `protobuf:"varint,1,opt,name=non_client_settable_id,json=nonClientSettableId,proto3" json:"non_client_settable_id,omitempty"`
	// contains filtered or unexported fields
}

The properties of the create method.

func (*Methods_CreateMethod) Descriptor deprecated

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

Deprecated: Use Methods_CreateMethod.ProtoReflect.Descriptor instead.

func (*Methods_CreateMethod) GetNonClientSettableId

func (x *Methods_CreateMethod) GetNonClientSettableId() bool

func (*Methods_CreateMethod) ProtoMessage

func (*Methods_CreateMethod) ProtoMessage()

func (*Methods_CreateMethod) ProtoReflect

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

func (*Methods_CreateMethod) Reset

func (x *Methods_CreateMethod) Reset()

func (*Methods_CreateMethod) String

func (x *Methods_CreateMethod) String() string

type Methods_CustomMethod

type Methods_CustomMethod struct {

	// The name of the custom method.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The type of the custom method.
	MethodType Methods_CustomMethod_MethodType `` /* 129-byte string literal not displayed */
	// The properties of the custom method request.
	Request *Property `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
	// The properties of the custom method response.
	Response *Property `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

Properties of a custom method.

func (*Methods_CustomMethod) Descriptor deprecated

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

Deprecated: Use Methods_CustomMethod.ProtoReflect.Descriptor instead.

func (*Methods_CustomMethod) GetMethodType

func (*Methods_CustomMethod) GetName

func (x *Methods_CustomMethod) GetName() string

func (*Methods_CustomMethod) GetRequest

func (x *Methods_CustomMethod) GetRequest() *Property

func (*Methods_CustomMethod) GetResponse

func (x *Methods_CustomMethod) GetResponse() *Property

func (*Methods_CustomMethod) ProtoMessage

func (*Methods_CustomMethod) ProtoMessage()

func (*Methods_CustomMethod) ProtoReflect

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

func (*Methods_CustomMethod) Reset

func (x *Methods_CustomMethod) Reset()

func (*Methods_CustomMethod) String

func (x *Methods_CustomMethod) String() string

type Methods_CustomMethod_MethodType

type Methods_CustomMethod_MethodType int32
const (
	Methods_CustomMethod_METHOD_TYPE_UNSPECIFIED Methods_CustomMethod_MethodType = 0
	Methods_CustomMethod_GET                     Methods_CustomMethod_MethodType = 1
	Methods_CustomMethod_POST                    Methods_CustomMethod_MethodType = 2
)

func (Methods_CustomMethod_MethodType) Descriptor

func (Methods_CustomMethod_MethodType) Enum

func (Methods_CustomMethod_MethodType) EnumDescriptor deprecated

func (Methods_CustomMethod_MethodType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Methods_CustomMethod_MethodType.Descriptor instead.

func (Methods_CustomMethod_MethodType) Number

func (Methods_CustomMethod_MethodType) String

func (Methods_CustomMethod_MethodType) Type

type Methods_DeleteMethod

type Methods_DeleteMethod struct {
	// contains filtered or unexported fields
}

The properties of the delete method.

func (*Methods_DeleteMethod) Descriptor deprecated

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

Deprecated: Use Methods_DeleteMethod.ProtoReflect.Descriptor instead.

func (*Methods_DeleteMethod) ProtoMessage

func (*Methods_DeleteMethod) ProtoMessage()

func (*Methods_DeleteMethod) ProtoReflect

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

func (*Methods_DeleteMethod) Reset

func (x *Methods_DeleteMethod) Reset()

func (*Methods_DeleteMethod) String

func (x *Methods_DeleteMethod) String() string

type Methods_GlobalListMethod

type Methods_GlobalListMethod struct {
	// contains filtered or unexported fields
}

The properties of the global list method.

func (*Methods_GlobalListMethod) Descriptor deprecated

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

Deprecated: Use Methods_GlobalListMethod.ProtoReflect.Descriptor instead.

func (*Methods_GlobalListMethod) ProtoMessage

func (*Methods_GlobalListMethod) ProtoMessage()

func (*Methods_GlobalListMethod) ProtoReflect

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

func (*Methods_GlobalListMethod) Reset

func (x *Methods_GlobalListMethod) Reset()

func (*Methods_GlobalListMethod) String

func (x *Methods_GlobalListMethod) String() string

type Methods_ListMethod

type Methods_ListMethod struct {

	// true if the list method has unreachable resources.
	HasUnreachableResources bool `` /* 133-byte string literal not displayed */
	// contains filtered or unexported fields
}

The properties of the list method.

func (*Methods_ListMethod) Descriptor deprecated

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

Deprecated: Use Methods_ListMethod.ProtoReflect.Descriptor instead.

func (*Methods_ListMethod) GetHasUnreachableResources

func (x *Methods_ListMethod) GetHasUnreachableResources() bool

func (*Methods_ListMethod) ProtoMessage

func (*Methods_ListMethod) ProtoMessage()

func (*Methods_ListMethod) ProtoReflect

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

func (*Methods_ListMethod) Reset

func (x *Methods_ListMethod) Reset()

func (*Methods_ListMethod) String

func (x *Methods_ListMethod) String() string

type Methods_ReadMethod

type Methods_ReadMethod struct {
	// contains filtered or unexported fields
}

The properties of the read method.

func (*Methods_ReadMethod) Descriptor deprecated

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

Deprecated: Use Methods_ReadMethod.ProtoReflect.Descriptor instead.

func (*Methods_ReadMethod) ProtoMessage

func (*Methods_ReadMethod) ProtoMessage()

func (*Methods_ReadMethod) ProtoReflect

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

func (*Methods_ReadMethod) Reset

func (x *Methods_ReadMethod) Reset()

func (*Methods_ReadMethod) String

func (x *Methods_ReadMethod) String() string

type Methods_UpdateMethod

type Methods_UpdateMethod struct {
	// contains filtered or unexported fields
}

The properties of the update method.

func (*Methods_UpdateMethod) Descriptor deprecated

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

Deprecated: Use Methods_UpdateMethod.ProtoReflect.Descriptor instead.

func (*Methods_UpdateMethod) ProtoMessage

func (*Methods_UpdateMethod) ProtoMessage()

func (*Methods_UpdateMethod) ProtoReflect

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

func (*Methods_UpdateMethod) Reset

func (x *Methods_UpdateMethod) Reset()

func (*Methods_UpdateMethod) String

func (x *Methods_UpdateMethod) String() string

type ObjectType

type ObjectType struct {

	// message_name and properties cannot both be set at the same time.
	MessageName string               `protobuf:"bytes,1,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"`
	Properties  map[string]*Property `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ObjectType) Descriptor deprecated

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

Deprecated: Use ObjectType.ProtoReflect.Descriptor instead.

func (*ObjectType) GetMessageName

func (x *ObjectType) GetMessageName() string

func (*ObjectType) GetProperties

func (x *ObjectType) GetProperties() map[string]*Property

func (*ObjectType) ProtoMessage

func (*ObjectType) ProtoMessage()

func (*ObjectType) ProtoReflect

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

func (*ObjectType) Reset

func (x *ObjectType) Reset()

func (*ObjectType) String

func (x *ObjectType) String() string

type Property

type Property struct {

	// Types that are assignable to Types:
	//
	//	*Property_Type
	//	*Property_ObjectType
	//	*Property_ArrayType
	Types isProperty_Types `protobuf_oneof:"types"`
	// field number used for protobuf or other systems where fields must
	// be explicitly enumerated.
	Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
	// true if the property is read only.
	ReadOnly bool `protobuf:"varint,3,opt,name=readOnly,proto3" json:"readOnly,omitempty"`
	// true if the property is required.
	Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
	// contains filtered or unexported fields
}

A property represents a field in a resource or object.

func (*Property) Descriptor deprecated

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

Deprecated: Use Property.ProtoReflect.Descriptor instead.

func (*Property) GetArrayType

func (x *Property) GetArrayType() *ArrayType

func (*Property) GetNumber

func (x *Property) GetNumber() int32

func (*Property) GetObjectType

func (x *Property) GetObjectType() *ObjectType

func (*Property) GetReadOnly

func (x *Property) GetReadOnly() bool

func (*Property) GetRequired

func (x *Property) GetRequired() bool

func (*Property) GetType

func (x *Property) GetType() Type

func (*Property) GetTypes

func (m *Property) GetTypes() isProperty_Types

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) ProtoReflect

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

func (*Property) Reset

func (x *Property) Reset()

func (*Property) String

func (x *Property) String() string

type Property_ArrayType

type Property_ArrayType struct {
	ArrayType *ArrayType `protobuf:"bytes,6,opt,name=array_type,json=arrayType,proto3,oneof"`
}

type Property_ObjectType

type Property_ObjectType struct {
	ObjectType *ObjectType `protobuf:"bytes,5,opt,name=object_type,json=objectType,proto3,oneof"`
}

type Property_Type

type Property_Type struct {
	Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=Type,oneof"`
}

type Resource

type Resource struct {

	// The type of the resource. Used to programmatically
	// refer to and identify the resource.
	Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// The plural of the resource. Used in documentation.
	Plural string `protobuf:"bytes,2,opt,name=plural,proto3" json:"plural,omitempty"`
	// The list of parent resources, referred to via the kind.
	Parents []string `protobuf:"bytes,3,rep,name=parents,proto3" json:"parents,omitempty"`
	// Properties of the resource. Also often referred to as it's schema.
	Properties map[string]*Property `` /* 161-byte string literal not displayed */
	// methods support by the resource.
	Methods *Methods `protobuf:"bytes,5,opt,name=methods,proto3" json:"methods,omitempty"`
	// contains filtered or unexported fields
}

A resource.

func (*Resource) Descriptor deprecated

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetKind

func (x *Resource) GetKind() string

func (*Resource) GetMethods

func (x *Resource) GetMethods() *Methods

func (*Resource) GetParents

func (x *Resource) GetParents() []string

func (*Resource) GetPlural

func (x *Resource) GetPlural() string

func (*Resource) GetProperties

func (x *Resource) GetProperties() map[string]*Property

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

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

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type Schema

type Schema struct {

	// The name of the schema.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The properties of the schema.
	Properties map[string]*Property `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

An object is a collection of properties, that does not have methods of it's on in the API. It is currently only used as a property of a resource.

func (*Schema) Descriptor deprecated

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

Deprecated: Use Schema.ProtoReflect.Descriptor instead.

func (*Schema) GetName

func (x *Schema) GetName() string

func (*Schema) GetProperties

func (x *Schema) GetProperties() map[string]*Property

func (*Schema) ProtoMessage

func (*Schema) ProtoMessage()

func (*Schema) ProtoReflect

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

func (*Schema) Reset

func (x *Schema) Reset()

func (*Schema) String

func (x *Schema) String() string

type Service

type Service struct {

	// The name of the API.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The URL of the API service.
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// The resources that the API service exposes.
	Resources []*Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"`
	// These are additional objects (list of properties) that may be referenced from another property.
	Schemas []*Schema `protobuf:"bytes,4,rep,name=schemas,proto3" json:"schemas,omitempty"`
	// contains filtered or unexported fields
}

An API service.

func (*Service) Descriptor deprecated

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

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetResources

func (x *Service) GetResources() []*Resource

func (*Service) GetSchemas

func (x *Service) GetSchemas() []*Schema

func (*Service) GetUrl

func (x *Service) GetUrl() string

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 Type

type Type int32

The pritimive types supported by the schema.

const (
	// The type is unspecified.
	Type_TYPE_UNSPECIFIED Type = 0
	// The type is a string.
	Type_STRING Type = 1
	// The type is an int32.
	Type_INT32 Type = 2
	// The type is an int64.
	Type_INT64 Type = 3
	// The type is a double.
	Type_DOUBLE Type = 4
	// The type is a float.
	Type_FLOAT Type = 5
	// The type is a boolean.
	Type_BOOLEAN Type = 6
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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