Documentation ¶
Index ¶
- Variables
- type PagerSpec
- func (*PagerSpec) Descriptor() ([]byte, []int)deprecated
- func (x *PagerSpec) GetDefaultPageSize() int32
- func (x *PagerSpec) GetIsDisabled() bool
- func (x *PagerSpec) GetMaxPageSize() int32
- func (*PagerSpec) ProtoMessage()
- func (x *PagerSpec) ProtoReflect() protoreflect.Message
- func (x *PagerSpec) Reset()
- func (x *PagerSpec) String() string
- type ResourceChange
- type ResourceSpec
- func (*ResourceSpec) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceSpec) GetAsyncDeletion() bool
- func (x *ResourceSpec) GetCollection() string
- func (x *ResourceSpec) GetCreationIdPattern() string
- func (x *ResourceSpec) GetDisableDbConstraints() bool
- func (x *ResourceSpec) GetDisableStandardAccess() bool
- func (x *ResourceSpec) GetIdPattern() string
- func (x *ResourceSpec) GetOnParentDeletedBehavior() goten.OnReferencedObjectDeleted
- func (x *ResourceSpec) GetPager() *PagerSpec
- func (x *ResourceSpec) GetParents() []string
- func (x *ResourceSpec) GetPlural() string
- func (x *ResourceSpec) GetScopeAttributes() []string
- func (x *ResourceSpec) GetViews() []*ViewSpec
- func (*ResourceSpec) ProtoMessage()
- func (x *ResourceSpec) ProtoReflect() protoreflect.Message
- func (x *ResourceSpec) Reset()
- func (x *ResourceSpec) String() string
- type ScopeAttributeSpec
- func (*ScopeAttributeSpec) Descriptor() ([]byte, []int)deprecated
- func (x *ScopeAttributeSpec) GetIdPattern() string
- func (x *ScopeAttributeSpec) GetOptional() bool
- func (x *ScopeAttributeSpec) GetPlural() string
- func (*ScopeAttributeSpec) ProtoMessage()
- func (x *ScopeAttributeSpec) ProtoReflect() protoreflect.Message
- func (x *ScopeAttributeSpec) Reset()
- func (x *ScopeAttributeSpec) String() string
- type SearchSpec
- func (*SearchSpec) Descriptor() ([]byte, []int)deprecated
- func (x *SearchSpec) GetFilterableOnly() []string
- func (x *SearchSpec) GetFullySearchable() []string
- func (x *SearchSpec) GetSortable() []string
- func (*SearchSpec) ProtoMessage()
- func (x *SearchSpec) ProtoReflect() protoreflect.Message
- func (x *SearchSpec) Reset()
- func (x *SearchSpec) String() string
- type ViewSpec
- type ViewSpec_Field
- func (*ViewSpec_Field) Descriptor() ([]byte, []int)deprecated
- func (x *ViewSpec_Field) GetDisplayName() string
- func (x *ViewSpec_Field) GetPath() string
- func (*ViewSpec_Field) ProtoMessage()
- func (x *ViewSpec_Field) ProtoReflect() protoreflect.Message
- func (x *ViewSpec_Field) Reset()
- func (x *ViewSpec_Field) String() string
Constants ¶
This section is empty.
Variables ¶
var ( // optional goten.annotations.ResourceSpec resource = 69010; E_Resource = &file_goten_annotations_resource_proto_extTypes[0] // optional goten.annotations.ResourceChange resource_change = 69011; E_ResourceChange = &file_goten_annotations_resource_proto_extTypes[1] // optional goten.annotations.ScopeAttributeSpec scope_attribute = 69012; E_ScopeAttribute = &file_goten_annotations_resource_proto_extTypes[2] // optional goten.annotations.SearchSpec search = 69013; E_Search = &file_goten_annotations_resource_proto_extTypes[3] )
Extension fields to descriptorpb.MessageOptions.
var File_goten_annotations_resource_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type PagerSpec ¶
type PagerSpec struct { // whether to skip default pager implementation IsDisabled bool `protobuf:"varint,1,opt,name=is_disabled,json=isDisabled,proto3" json:"is_disabled,omitempty"` DefaultPageSize int32 `protobuf:"varint,2,opt,name=default_page_size,json=defaultPageSize,proto3" json:"default_page_size,omitempty"` MaxPageSize int32 `protobuf:"varint,3,opt,name=max_page_size,json=maxPageSize,proto3" json:"max_page_size,omitempty"` // contains filtered or unexported fields }
func (*PagerSpec) Descriptor
deprecated
func (*PagerSpec) GetDefaultPageSize ¶
func (*PagerSpec) GetIsDisabled ¶
func (*PagerSpec) GetMaxPageSize ¶
func (*PagerSpec) ProtoMessage ¶
func (*PagerSpec) ProtoMessage()
func (*PagerSpec) ProtoReflect ¶
func (x *PagerSpec) ProtoReflect() protoreflect.Message
type ResourceChange ¶
type ResourceChange struct { Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` // contains filtered or unexported fields }
Marks resource change type used in Watch implementation
func (*ResourceChange) Descriptor
deprecated
func (*ResourceChange) Descriptor() ([]byte, []int)
Deprecated: Use ResourceChange.ProtoReflect.Descriptor instead.
func (*ResourceChange) GetResource ¶
func (x *ResourceChange) GetResource() string
func (*ResourceChange) ProtoMessage ¶
func (*ResourceChange) ProtoMessage()
func (*ResourceChange) ProtoReflect ¶
func (x *ResourceChange) ProtoReflect() protoreflect.Message
func (*ResourceChange) Reset ¶
func (x *ResourceChange) Reset()
func (*ResourceChange) String ¶
func (x *ResourceChange) String() string
type ResourceSpec ¶
type ResourceSpec struct { // plural form of resource noun, e.g. shelf -> shelves. Defaults to resource // name + "s" Plural string `protobuf:"bytes,1,opt,name=plural,proto3" json:"plural,omitempty"` // database table or collection used for storing DB records. Defaults to // plural form. Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` // List of possible parent resource names, e.g. "Shelf". If no parents are given, then resource // cannot have any parents. If one of the parents is "goten.ntt.com/None", then resource may or // may not have a parent. Parents are forming initial part of the resource name pattern - // each parent is adding patters in parallel - one of them is active at the moment. // If resource parent is in foreign proto package, then proto package should be followed by // slash and resource name, for example: ntt.iam.v1alpha/Project Parents []string `protobuf:"bytes,3,rep,name=parents,proto3" json:"parents,omitempty"` // Additional, optional attributes injected into resource name and which form "parent name" after name derived from // ancestral resource (if is present). Resource name can have many attributes and they are connected in series, in the // order defined in resource schema. For example, suppose we defined following attribute: // // { // plural: "Regions" // optional: false // } // // Then if we define following spec for resource "Invitation": // // { // plural: "Invitations" // parents: "Project" // parents: "Organization" // scope_attributes: "Region" // } // // then following name patterns will be generated: // * projects/{project_id}/regions/{region_id}/invitations/{invitation_id} // * organizations/{organization_id}/regions/{region_id}/invitations/{invitation_id} // // For given example, there must be defined "message Region" with defined option // ScopeAttributeSpec. Just like in case of resource parents, messages from foreign proto // packages must be prepended with proto package name and slash. ScopeAttributes []string `protobuf:"bytes,4,rep,name=scope_attributes,json=scopeAttributes,proto3" json:"scope_attributes,omitempty"` // name segment id pattern. If not present, // [a-zA-Z0-9_.-]{1,128} is assumed (migrating to creation_id_pattern) IdPattern string `protobuf:"bytes,5,opt,name=id_pattern,json=idPattern,proto3" json:"id_pattern,omitempty"` // Name segment ID pattern used when validating creation of new resource. // It is supposed to replace id_pattern in the future. // If not present and id_pattern is not default one, then its same as id_pattern. // Otherwise, [a-z][a-z0-9\-]{0,28}[a-z0-9] is assumed. // It is important that id_pattern with backward compatibility also conforms // to this new creation_id_pattern. If necessary, then you should modify // id_pattern so it can match old and new names. CreationIdPattern string `protobuf:"bytes,6,opt,name=creation_id_pattern,json=creationIdPattern,proto3" json:"creation_id_pattern,omitempty"` // Defines behaviour of resource when parent is deleted // UNSET in this field is not allowed. OnParentDeletedBehavior goten.OnReferencedObjectDeleted `` /* 184-byte string literal not displayed */ // List of defined views for the resource - you can define views // for BASIC, DETAIL and NAME - however NAME also is provided by // goten automatically if you dont provide yours. Automatic NAME // view contains name field (see name_field) and display_name (if // present in the list of fields). Views []*ViewSpec `protobuf:"bytes,8,rep,name=views,proto3" json:"views,omitempty"` // If true, it means standard Access (Store and API) are not used // for this resource. DisableStandardAccess bool `` /* 127-byte string literal not displayed */ // Pager spec for List/Watch collection methods Pager *PagerSpec `protobuf:"bytes,10,opt,name=pager,proto3" json:"pager,omitempty"` // If true, then deletion of this resource is not a single event, but // a process involving special cleanup process - usually asynchronous // set cascade deletion / unset operations for all referencing resources. // User will be still able to see resource with GET/LIST/WATCH operations // after sending DELETE. Only once all triggered functions are complete, // resource will be truly deleted in asynchronous manner. // // This option must not be used if resource has references with cascade // deletion handler! // // Deletion process is implemented on store, (not server) layer: // * Store.Delete(ctx, reference) causes resource to be moved to deleting // state - and all store plugins will be notified via OnUpdate handler. // * Despite deletion being de facto update, system will pick up deleting // status and start cleaning up all dependencies. Once done, it will // delete the resource and all store plugins will be notified via // OnDeleted handler. AsyncDeletion bool `protobuf:"varint,11,opt,name=async_deletion,json=asyncDeletion,proto3" json:"async_deletion,omitempty"` // If true, resource type will not be subject to database constraints: // - References FROM this resource will not be actually checked for existence. // Nor their effects (Blocking, cascade delete...) will work. // - References TO this resource type will also not block, cascade delete etc. // - Resources of this type will not be garbage-collected by db-controller. // // Resource shadow instances (from schema-mixin service) will not be created. // This flag should be used only for resources that are not accessible to users // (in writing mode at least). Suitable for some internal types. DisableDbConstraints bool `protobuf:"varint,12,opt,name=disable_db_constraints,json=disableDbConstraints,proto3" json:"disable_db_constraints,omitempty"` // contains filtered or unexported fields }
Description of Resource that is served through REST
func (*ResourceSpec) Descriptor
deprecated
func (*ResourceSpec) Descriptor() ([]byte, []int)
Deprecated: Use ResourceSpec.ProtoReflect.Descriptor instead.
func (*ResourceSpec) GetAsyncDeletion ¶
func (x *ResourceSpec) GetAsyncDeletion() bool
func (*ResourceSpec) GetCollection ¶
func (x *ResourceSpec) GetCollection() string
func (*ResourceSpec) GetCreationIdPattern ¶
func (x *ResourceSpec) GetCreationIdPattern() string
func (*ResourceSpec) GetDisableDbConstraints ¶
func (x *ResourceSpec) GetDisableDbConstraints() bool
func (*ResourceSpec) GetDisableStandardAccess ¶
func (x *ResourceSpec) GetDisableStandardAccess() bool
func (*ResourceSpec) GetIdPattern ¶
func (x *ResourceSpec) GetIdPattern() string
func (*ResourceSpec) GetOnParentDeletedBehavior ¶
func (x *ResourceSpec) GetOnParentDeletedBehavior() goten.OnReferencedObjectDeleted
func (*ResourceSpec) GetPager ¶
func (x *ResourceSpec) GetPager() *PagerSpec
func (*ResourceSpec) GetParents ¶
func (x *ResourceSpec) GetParents() []string
func (*ResourceSpec) GetPlural ¶
func (x *ResourceSpec) GetPlural() string
func (*ResourceSpec) GetScopeAttributes ¶
func (x *ResourceSpec) GetScopeAttributes() []string
func (*ResourceSpec) GetViews ¶
func (x *ResourceSpec) GetViews() []*ViewSpec
func (*ResourceSpec) ProtoMessage ¶
func (*ResourceSpec) ProtoMessage()
func (*ResourceSpec) ProtoReflect ¶
func (x *ResourceSpec) ProtoReflect() protoreflect.Message
func (*ResourceSpec) Reset ¶
func (x *ResourceSpec) Reset()
func (*ResourceSpec) String ¶
func (x *ResourceSpec) String() string
type ScopeAttributeSpec ¶
type ScopeAttributeSpec struct { // plural noun for this attribute. Plural string `protobuf:"bytes,1,opt,name=plural,proto3" json:"plural,omitempty"` // scope attribute id pattern. If not present, [a-z][a-z0-9\-]{0,28}[a-z0-9] is assumed. IdPattern string `protobuf:"bytes,2,opt,name=id_pattern,json=idPattern,proto3" json:"id_pattern,omitempty"` // Information whether this attribute is optional or not. If optional, then number of name patters for // given resource is doubled. Optional bool `protobuf:"varint,3,opt,name=optional,proto3" json:"optional,omitempty"` // contains filtered or unexported fields }
ScopeAttributeSpec describes optional attribute (variable) that can be attached to resource name as part of the scope. This allows injecting important information into resource name that is neither name of the parent resource (if any) or ID of the resource itself. Goten comes with one spec attribute: Region. During code generation, goten will insert given attributes into resource name patterns.
func (*ScopeAttributeSpec) Descriptor
deprecated
func (*ScopeAttributeSpec) Descriptor() ([]byte, []int)
Deprecated: Use ScopeAttributeSpec.ProtoReflect.Descriptor instead.
func (*ScopeAttributeSpec) GetIdPattern ¶
func (x *ScopeAttributeSpec) GetIdPattern() string
func (*ScopeAttributeSpec) GetOptional ¶
func (x *ScopeAttributeSpec) GetOptional() bool
func (*ScopeAttributeSpec) GetPlural ¶
func (x *ScopeAttributeSpec) GetPlural() string
func (*ScopeAttributeSpec) ProtoMessage ¶
func (*ScopeAttributeSpec) ProtoMessage()
func (*ScopeAttributeSpec) ProtoReflect ¶
func (x *ScopeAttributeSpec) ProtoReflect() protoreflect.Message
func (*ScopeAttributeSpec) Reset ¶
func (x *ScopeAttributeSpec) Reset()
func (*ScopeAttributeSpec) String ¶
func (x *ScopeAttributeSpec) String() string
type SearchSpec ¶
type SearchSpec struct { // List of field paths (object or strings) by which resources should be searchable. // By putting fields here we are also instructing search engine that fields should // be filterable. FullySearchable []string `protobuf:"bytes,1,rep,name=fully_searchable,json=fullySearchable,proto3" json:"fully_searchable,omitempty"` // List of field paths which should be filterable by search engine. FilterableOnly []string `protobuf:"bytes,2,rep,name=filterable_only,json=filterableOnly,proto3" json:"filterable_only,omitempty"` // List of field paths by which sorting should be possible (for both directions). Sortable []string `protobuf:"bytes,3,rep,name=sortable,proto3" json:"sortable,omitempty"` // contains filtered or unexported fields }
SearchSpec describes Resource annotations for Search engine, which can be optionally configured along Store.
func (*SearchSpec) Descriptor
deprecated
func (*SearchSpec) Descriptor() ([]byte, []int)
Deprecated: Use SearchSpec.ProtoReflect.Descriptor instead.
func (*SearchSpec) GetFilterableOnly ¶
func (x *SearchSpec) GetFilterableOnly() []string
func (*SearchSpec) GetFullySearchable ¶
func (x *SearchSpec) GetFullySearchable() []string
func (*SearchSpec) GetSortable ¶
func (x *SearchSpec) GetSortable() []string
func (*SearchSpec) ProtoMessage ¶
func (*SearchSpec) ProtoMessage()
func (*SearchSpec) ProtoReflect ¶
func (x *SearchSpec) ProtoReflect() protoreflect.Message
func (*SearchSpec) Reset ¶
func (x *SearchSpec) Reset()
func (*SearchSpec) String ¶
func (x *SearchSpec) String() string
type ViewSpec ¶
type ViewSpec struct { // Type of view View view.View `protobuf:"varint,1,opt,name=view,proto3,enum=goten.types.View" json:"view,omitempty"` // List of fields associated with view type Fields []*ViewSpec_Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` // contains filtered or unexported fields }
ViewSpec associates View with list of fields available in resource obtained from server.
func (*ViewSpec) Descriptor
deprecated
func (*ViewSpec) GetFields ¶
func (x *ViewSpec) GetFields() []*ViewSpec_Field
func (*ViewSpec) ProtoMessage ¶
func (*ViewSpec) ProtoMessage()
func (*ViewSpec) ProtoReflect ¶
func (x *ViewSpec) ProtoReflect() protoreflect.Message
type ViewSpec_Field ¶
type ViewSpec_Field struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // contains filtered or unexported fields }
Field describes single field - path to the field and (optional!) display name (usable for clients)
func (*ViewSpec_Field) Descriptor
deprecated
func (*ViewSpec_Field) Descriptor() ([]byte, []int)
Deprecated: Use ViewSpec_Field.ProtoReflect.Descriptor instead.
func (*ViewSpec_Field) GetDisplayName ¶
func (x *ViewSpec_Field) GetDisplayName() string
func (*ViewSpec_Field) GetPath ¶
func (x *ViewSpec_Field) GetPath() string
func (*ViewSpec_Field) ProtoMessage ¶
func (*ViewSpec_Field) ProtoMessage()
func (*ViewSpec_Field) ProtoReflect ¶
func (x *ViewSpec_Field) ProtoReflect() protoreflect.Message
func (*ViewSpec_Field) Reset ¶
func (x *ViewSpec_Field) Reset()
func (*ViewSpec_Field) String ¶
func (x *ViewSpec_Field) String() string