Documentation
¶
Index ¶
- Variables
- type FieldType
- func (*FieldType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType) GetFieldMask() *FieldType_FieldMaskType
- func (x *FieldType) GetFilter() *FieldType_FilterType
- func (x *FieldType) GetName() *FieldType_NameType
- func (x *FieldType) GetOrderBy() *FieldType_OrderByType
- func (x *FieldType) GetPagerCursor() *FieldType_PagerCursorType
- func (x *FieldType) GetParentName() *FieldType_ParentNameType
- func (x *FieldType) GetParentReference() *FieldType_ParentReferenceType
- func (x *FieldType) GetReference() *FieldType_ReferenceType
- func (m *FieldType) GetType() isFieldType_Type
- func (*FieldType) ProtoMessage()
- func (x *FieldType) ProtoReflect() protoreflect.Message
- func (x *FieldType) Reset()
- func (x *FieldType) String() string
- type FieldType_FieldMask
- type FieldType_FieldMaskType
- func (*FieldType_FieldMaskType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType_FieldMaskType) GetResource() string
- func (*FieldType_FieldMaskType) ProtoMessage()
- func (x *FieldType_FieldMaskType) ProtoReflect() protoreflect.Message
- func (x *FieldType_FieldMaskType) Reset()
- func (x *FieldType_FieldMaskType) String() string
- type FieldType_Filter
- type FieldType_FilterType
- func (*FieldType_FilterType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType_FilterType) GetResource() string
- func (*FieldType_FilterType) ProtoMessage()
- func (x *FieldType_FilterType) ProtoReflect() protoreflect.Message
- func (x *FieldType_FilterType) Reset()
- func (x *FieldType_FilterType) String() string
- type FieldType_Name
- type FieldType_NameType
- func (*FieldType_NameType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType_NameType) GetResource() string
- func (*FieldType_NameType) ProtoMessage()
- func (x *FieldType_NameType) ProtoReflect() protoreflect.Message
- func (x *FieldType_NameType) Reset()
- func (x *FieldType_NameType) String() string
- type FieldType_OrderBy
- type FieldType_OrderByType
- func (*FieldType_OrderByType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType_OrderByType) GetResource() string
- func (*FieldType_OrderByType) ProtoMessage()
- func (x *FieldType_OrderByType) ProtoReflect() protoreflect.Message
- func (x *FieldType_OrderByType) Reset()
- func (x *FieldType_OrderByType) String() string
- type FieldType_PagerCursor
- type FieldType_PagerCursorType
- func (*FieldType_PagerCursorType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType_PagerCursorType) GetResource() string
- func (*FieldType_PagerCursorType) ProtoMessage()
- func (x *FieldType_PagerCursorType) ProtoReflect() protoreflect.Message
- func (x *FieldType_PagerCursorType) Reset()
- func (x *FieldType_PagerCursorType) String() string
- type FieldType_ParentName
- type FieldType_ParentNameType
- func (*FieldType_ParentNameType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType_ParentNameType) GetResource() string
- func (*FieldType_ParentNameType) ProtoMessage()
- func (x *FieldType_ParentNameType) ProtoReflect() protoreflect.Message
- func (x *FieldType_ParentNameType) Reset()
- func (x *FieldType_ParentNameType) String() string
- type FieldType_ParentReference
- type FieldType_ParentReferenceType
- func (*FieldType_ParentReferenceType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType_ParentReferenceType) GetResource() string
- func (*FieldType_ParentReferenceType) ProtoMessage()
- func (x *FieldType_ParentReferenceType) ProtoReflect() protoreflect.Message
- func (x *FieldType_ParentReferenceType) Reset()
- func (x *FieldType_ParentReferenceType) String() string
- type FieldType_Reference
- type FieldType_ReferenceType
- func (*FieldType_ReferenceType) Descriptor() ([]byte, []int)deprecated
- func (x *FieldType_ReferenceType) GetResource() string
- func (x *FieldType_ReferenceType) GetTargetDeleteBehavior() OnReferencedObjectDeleted
- func (*FieldType_ReferenceType) ProtoMessage()
- func (x *FieldType_ReferenceType) ProtoReflect() protoreflect.Message
- func (x *FieldType_ReferenceType) Reset()
- func (x *FieldType_ReferenceType) String() string
- type GoPackage
- type MergeOpts
- func (*MergeOpts) Descriptor() ([]byte, []int)deprecated
- func (x *MergeOpts) GetMap() *MergeOpts_Map
- func (m *MergeOpts) GetOpts() isMergeOpts_Opts
- func (x *MergeOpts) GetRepeated() *MergeOpts_Repeated
- func (*MergeOpts) ProtoMessage()
- func (x *MergeOpts) ProtoReflect() protoreflect.Message
- func (x *MergeOpts) Reset()
- func (x *MergeOpts) String() string
- type MergeOpts_FieldBehavior
- func (MergeOpts_FieldBehavior) Descriptor() protoreflect.EnumDescriptor
- func (x MergeOpts_FieldBehavior) Enum() *MergeOpts_FieldBehavior
- func (MergeOpts_FieldBehavior) EnumDescriptor() ([]byte, []int)deprecated
- func (x MergeOpts_FieldBehavior) Number() protoreflect.EnumNumber
- func (x MergeOpts_FieldBehavior) String() string
- func (MergeOpts_FieldBehavior) Type() protoreflect.EnumType
- type MergeOpts_Map
- type MergeOpts_Map_
- type MergeOpts_Repeated
- func (*MergeOpts_Repeated) Descriptor() ([]byte, []int)deprecated
- func (x *MergeOpts_Repeated) GetBehavior() MergeOpts_FieldBehavior
- func (x *MergeOpts_Repeated) GetIdentifiers() []string
- func (x *MergeOpts_Repeated) GetSorting() MergeOpts_Repeated_SortingOrder
- func (*MergeOpts_Repeated) ProtoMessage()
- func (x *MergeOpts_Repeated) ProtoReflect() protoreflect.Message
- func (x *MergeOpts_Repeated) Reset()
- func (x *MergeOpts_Repeated) String() string
- type MergeOpts_Repeated_
- type MergeOpts_Repeated_SortingOrder
- func (MergeOpts_Repeated_SortingOrder) Descriptor() protoreflect.EnumDescriptor
- func (x MergeOpts_Repeated_SortingOrder) Enum() *MergeOpts_Repeated_SortingOrder
- func (MergeOpts_Repeated_SortingOrder) EnumDescriptor() ([]byte, []int)deprecated
- func (x MergeOpts_Repeated_SortingOrder) Number() protoreflect.EnumNumber
- func (x MergeOpts_Repeated_SortingOrder) String() string
- func (MergeOpts_Repeated_SortingOrder) Type() protoreflect.EnumType
- type OnReferencedObjectDeleted
- func (OnReferencedObjectDeleted) Descriptor() protoreflect.EnumDescriptor
- func (x OnReferencedObjectDeleted) Enum() *OnReferencedObjectDeleted
- func (OnReferencedObjectDeleted) EnumDescriptor() ([]byte, []int)deprecated
- func (x OnReferencedObjectDeleted) Number() protoreflect.EnumNumber
- func (x OnReferencedObjectDeleted) String() string
- func (OnReferencedObjectDeleted) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( OnReferencedObjectDeleted_name = map[int32]string{ 0: "UNDEFINED", 1: "BLOCK", 2: "UNSET", 3: "CASCADE_DELETE", 4: "ASYNC_UNSET", 5: "ASYNC_CASCADE_DELETE", 6: "ALLOW_DANGLING", } OnReferencedObjectDeleted_value = map[string]int32{ "UNDEFINED": 0, "BLOCK": 1, "UNSET": 2, "CASCADE_DELETE": 3, "ASYNC_UNSET": 4, "ASYNC_CASCADE_DELETE": 5, "ALLOW_DANGLING": 6, } )
Enum value maps for OnReferencedObjectDeleted.
var ( MergeOpts_FieldBehavior_name = map[int32]string{ 0: "DEFAULT", 1: "REPLACE", 2: "DISCARD_ONLY_IN_DEST", 3: "DISCARD_ONLY_IN_SOURCE", 4: "OPERATION_AND", 5: "OPERATION_XOR", 6: "APPEND", } MergeOpts_FieldBehavior_value = map[string]int32{ "DEFAULT": 0, "REPLACE": 1, "DISCARD_ONLY_IN_DEST": 2, "DISCARD_ONLY_IN_SOURCE": 3, "OPERATION_AND": 4, "OPERATION_XOR": 5, "APPEND": 6, } )
Enum value maps for MergeOpts_FieldBehavior.
var ( MergeOpts_Repeated_SortingOrder_name = map[int32]string{ 0: "NO_SORTING", 1: "ASCENDING", 2: "DESCENDING", } MergeOpts_Repeated_SortingOrder_value = map[string]int32{ "NO_SORTING": 0, "ASCENDING": 1, "DESCENDING": 2, } )
Enum value maps for MergeOpts_Repeated_SortingOrder.
var ( // optional goten.annotations.FieldType type = 69030; E_Type = &file_goten_annotations_goten_proto_extTypes[2] // optional bool primary_id = 69021; E_PrimaryId = &file_goten_annotations_goten_proto_extTypes[3] // when output only is set, all input (create/update) requests for this field // *must* be ignored: // https://cloud.google.com/apis/design/design_patterns#output_fields // When Field is embedded, property is propagated to child messages. // First occurrence of true value cuts-off whole field path subtree. // // optional bool output_only = 69022; E_OutputOnly = &file_goten_annotations_goten_proto_extTypes[4] // Describes what code should be generated for merging // operation for a given field. // // optional goten.annotations.MergeOpts merge = 69101; E_Merge = &file_goten_annotations_goten_proto_extTypes[5] )
Extension fields to descriptorpb.FieldOptions.
var ( // Indicates if a Goten-owned proto message should be extended // with extra functionalities (offered by protoc-goten-gen-object) // plugin like strongly typed field paths & masks, customized merging, // field mask projections. // // optional bool object_ext_gen = 69101; E_ObjectExtGen = &file_goten_annotations_goten_proto_extTypes[1] )
Extension fields to descriptorpb.MessageOptions.
var ( // Affects default behavior of object_ext_gen flag for every message in a // File. // // optional bool object_ext_gen_all = 69101; E_ObjectExtGenAll = &file_goten_annotations_goten_proto_extTypes[0] )
Extension fields to descriptorpb.FileOptions.
var File_goten_annotations_goten_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type FieldType ¶
type FieldType struct {
// Types that are assignable to Type:
//
// *FieldType_Name
// *FieldType_Reference
// *FieldType_Filter
// *FieldType_PagerCursor
// *FieldType_OrderBy
// *FieldType_FieldMask
// *FieldType_ParentName
// *FieldType_ParentReference
Type isFieldType_Type `protobuf_oneof:"type"`
// contains filtered or unexported fields
}
func (*FieldType) Descriptor
deprecated
func (*FieldType) GetFieldMask ¶
func (x *FieldType) GetFieldMask() *FieldType_FieldMaskType
func (*FieldType) GetFilter ¶
func (x *FieldType) GetFilter() *FieldType_FilterType
func (*FieldType) GetName ¶
func (x *FieldType) GetName() *FieldType_NameType
func (*FieldType) GetOrderBy ¶
func (x *FieldType) GetOrderBy() *FieldType_OrderByType
func (*FieldType) GetPagerCursor ¶
func (x *FieldType) GetPagerCursor() *FieldType_PagerCursorType
func (*FieldType) GetParentName ¶
func (x *FieldType) GetParentName() *FieldType_ParentNameType
func (*FieldType) GetParentReference ¶
func (x *FieldType) GetParentReference() *FieldType_ParentReferenceType
func (*FieldType) GetReference ¶
func (x *FieldType) GetReference() *FieldType_ReferenceType
func (*FieldType) ProtoMessage ¶
func (*FieldType) ProtoMessage()
func (*FieldType) ProtoReflect ¶
func (x *FieldType) ProtoReflect() protoreflect.Message
type FieldType_FieldMask ¶
type FieldType_FieldMask struct {
FieldMask *FieldType_FieldMaskType `protobuf:"bytes,6,opt,name=field_mask,json=fieldMask,proto3,oneof"`
}
type FieldType_FieldMaskType ¶
type FieldType_FieldMaskType struct {
// resource whose fields this FieldMask refers to.
// It can have two possible format: either short version like "Shelf", or fully qualified
// like library.goten.com/Shelf - note the first part is not proto package, but service domain.
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// contains filtered or unexported fields
}
FieldMask for specifying a subset of fields to be fetched/updated. This type can only be used for fields in objects defined in proto package containing Goten service definition (ServicePackage - goten.annotations.service_pkg).
func (*FieldType_FieldMaskType) Descriptor
deprecated
func (*FieldType_FieldMaskType) Descriptor() ([]byte, []int)
Deprecated: Use FieldType_FieldMaskType.ProtoReflect.Descriptor instead.
func (*FieldType_FieldMaskType) GetResource ¶
func (x *FieldType_FieldMaskType) GetResource() string
func (*FieldType_FieldMaskType) ProtoMessage ¶
func (*FieldType_FieldMaskType) ProtoMessage()
func (*FieldType_FieldMaskType) ProtoReflect ¶
func (x *FieldType_FieldMaskType) ProtoReflect() protoreflect.Message
func (*FieldType_FieldMaskType) Reset ¶
func (x *FieldType_FieldMaskType) Reset()
func (*FieldType_FieldMaskType) String ¶
func (x *FieldType_FieldMaskType) String() string
type FieldType_Filter ¶
type FieldType_Filter struct {
Filter *FieldType_FilterType `protobuf:"bytes,3,opt,name=filter,proto3,oneof"`
}
type FieldType_FilterType ¶
type FieldType_FilterType struct {
// resource this string is referring to.
// It can have two possible format: either short version like "Shelf", or fully qualified
// like library.goten.com/Shelf - note the first part is not proto package, but service domain.
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// contains filtered or unexported fields
}
Filter to another resource. This type can only be used for fields in objects defined in proto package containing Goten service definition (ServicePackage - goten.annotations.service_pkg).
func (*FieldType_FilterType) Descriptor
deprecated
func (*FieldType_FilterType) Descriptor() ([]byte, []int)
Deprecated: Use FieldType_FilterType.ProtoReflect.Descriptor instead.
func (*FieldType_FilterType) GetResource ¶
func (x *FieldType_FilterType) GetResource() string
func (*FieldType_FilterType) ProtoMessage ¶
func (*FieldType_FilterType) ProtoMessage()
func (*FieldType_FilterType) ProtoReflect ¶
func (x *FieldType_FilterType) ProtoReflect() protoreflect.Message
func (*FieldType_FilterType) Reset ¶
func (x *FieldType_FilterType) Reset()
func (*FieldType_FilterType) String ¶
func (x *FieldType_FilterType) String() string
type FieldType_Name ¶
type FieldType_Name struct {
Name *FieldType_NameType `protobuf:"bytes,1,opt,name=name,proto3,oneof"`
}
type FieldType_NameType ¶
type FieldType_NameType struct {
// resource name.
// It can have two possible format: either short version like "Shelf", or fully qualified
// like library.goten.com/Shelf - note the first part is not proto package, but service domain.
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// contains filtered or unexported fields
}
Name type pointing to resource. This type can only be used for fields in objects defined in proto package containing Goten service definition (ServicePackage - goten.annotations.service_pkg).
func (*FieldType_NameType) Descriptor
deprecated
func (*FieldType_NameType) Descriptor() ([]byte, []int)
Deprecated: Use FieldType_NameType.ProtoReflect.Descriptor instead.
func (*FieldType_NameType) GetResource ¶
func (x *FieldType_NameType) GetResource() string
func (*FieldType_NameType) ProtoMessage ¶
func (*FieldType_NameType) ProtoMessage()
func (*FieldType_NameType) ProtoReflect ¶
func (x *FieldType_NameType) ProtoReflect() protoreflect.Message
func (*FieldType_NameType) Reset ¶
func (x *FieldType_NameType) Reset()
func (*FieldType_NameType) String ¶
func (x *FieldType_NameType) String() string
type FieldType_OrderBy ¶
type FieldType_OrderBy struct {
OrderBy *FieldType_OrderByType `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3,oneof"`
}
type FieldType_OrderByType ¶
type FieldType_OrderByType struct {
// resource on whose fields this OrderBy is able to define ordering.
// It can have two possible format: either short version like "Shelf", or fully qualified
// like library.goten.com/Shelf - note the first part is not proto package, but service domain.
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// contains filtered or unexported fields
}
OrderBy defines an ordering on resources fields. This type can only be used for fields in objects defined in proto package containing Goten service definition (ServicePackage - goten.annotations.service_pkg).
func (*FieldType_OrderByType) Descriptor
deprecated
func (*FieldType_OrderByType) Descriptor() ([]byte, []int)
Deprecated: Use FieldType_OrderByType.ProtoReflect.Descriptor instead.
func (*FieldType_OrderByType) GetResource ¶
func (x *FieldType_OrderByType) GetResource() string
func (*FieldType_OrderByType) ProtoMessage ¶
func (*FieldType_OrderByType) ProtoMessage()
func (*FieldType_OrderByType) ProtoReflect ¶
func (x *FieldType_OrderByType) ProtoReflect() protoreflect.Message
func (*FieldType_OrderByType) Reset ¶
func (x *FieldType_OrderByType) Reset()
func (*FieldType_OrderByType) String ¶
func (x *FieldType_OrderByType) String() string
type FieldType_PagerCursor ¶
type FieldType_PagerCursor struct {
PagerCursor *FieldType_PagerCursorType `protobuf:"bytes,4,opt,name=pager_cursor,json=pagerCursor,proto3,oneof"`
}
type FieldType_PagerCursorType ¶
type FieldType_PagerCursorType struct {
// resource whose collections this cursor is able to navigate.
// It can have two possible format: either short version like "Shelf", or fully qualified
// like library.goten.com/Shelf - note the first part is not proto package, but service domain.
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// contains filtered or unexported fields
}
PagerCursor for navigating paginated query results. This type can only be used for fields in objects defined in proto package containing Goten service definition (ServicePackage - goten.annotations.service_pkg).
func (*FieldType_PagerCursorType) Descriptor
deprecated
func (*FieldType_PagerCursorType) Descriptor() ([]byte, []int)
Deprecated: Use FieldType_PagerCursorType.ProtoReflect.Descriptor instead.
func (*FieldType_PagerCursorType) GetResource ¶
func (x *FieldType_PagerCursorType) GetResource() string
func (*FieldType_PagerCursorType) ProtoMessage ¶
func (*FieldType_PagerCursorType) ProtoMessage()
func (*FieldType_PagerCursorType) ProtoReflect ¶
func (x *FieldType_PagerCursorType) ProtoReflect() protoreflect.Message
func (*FieldType_PagerCursorType) Reset ¶
func (x *FieldType_PagerCursorType) Reset()
func (*FieldType_PagerCursorType) String ¶
func (x *FieldType_PagerCursorType) String() string
type FieldType_ParentName ¶
type FieldType_ParentName struct {
ParentName *FieldType_ParentNameType `protobuf:"bytes,7,opt,name=parent_name,json=parentName,proto3,oneof"`
}
type FieldType_ParentNameType ¶
type FieldType_ParentNameType struct {
// resource whose parent this field points to.
// It can only have short format - like "Shelf". It is not allowed to define parent to resource
// outside current service package.
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// contains filtered or unexported fields
}
ParentName points to parent name of given resource - in case of multiple possible parents it will contain internally oneof of all possible combinations. This type can only be used for fields in objects defined in proto package containing Goten service definition (ServicePackage - goten.annotations.service_pkg).
func (*FieldType_ParentNameType) Descriptor
deprecated
func (*FieldType_ParentNameType) Descriptor() ([]byte, []int)
Deprecated: Use FieldType_ParentNameType.ProtoReflect.Descriptor instead.
func (*FieldType_ParentNameType) GetResource ¶
func (x *FieldType_ParentNameType) GetResource() string
func (*FieldType_ParentNameType) ProtoMessage ¶
func (*FieldType_ParentNameType) ProtoMessage()
func (*FieldType_ParentNameType) ProtoReflect ¶
func (x *FieldType_ParentNameType) ProtoReflect() protoreflect.Message
func (*FieldType_ParentNameType) Reset ¶
func (x *FieldType_ParentNameType) Reset()
func (*FieldType_ParentNameType) String ¶
func (x *FieldType_ParentNameType) String() string
type FieldType_ParentReference ¶
type FieldType_ParentReference struct {
ParentReference *FieldType_ParentReferenceType `protobuf:"bytes,8,opt,name=parent_reference,json=parentReference,proto3,oneof"`
}
type FieldType_ParentReferenceType ¶
type FieldType_ParentReferenceType struct {
// resource whose parent this field points to.
// It can only have short format - like "Shelf". It is not allowed to define parent to resource
// outside current service package.
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// contains filtered or unexported fields
}
ParentReferenceType points to parent name of given resource - in case of multiple possible parents it will contain internally oneof of all possible combinations. Unlike name type, generated Go version will also contain reference to resolved object.
func (*FieldType_ParentReferenceType) Descriptor
deprecated
func (*FieldType_ParentReferenceType) Descriptor() ([]byte, []int)
Deprecated: Use FieldType_ParentReferenceType.ProtoReflect.Descriptor instead.
func (*FieldType_ParentReferenceType) GetResource ¶
func (x *FieldType_ParentReferenceType) GetResource() string
func (*FieldType_ParentReferenceType) ProtoMessage ¶
func (*FieldType_ParentReferenceType) ProtoMessage()
func (*FieldType_ParentReferenceType) ProtoReflect ¶
func (x *FieldType_ParentReferenceType) ProtoReflect() protoreflect.Message
func (*FieldType_ParentReferenceType) Reset ¶
func (x *FieldType_ParentReferenceType) Reset()
func (*FieldType_ParentReferenceType) String ¶
func (x *FieldType_ParentReferenceType) String() string
type FieldType_Reference ¶
type FieldType_Reference struct {
Reference *FieldType_ReferenceType `protobuf:"bytes,2,opt,name=reference,proto3,oneof"`
}
type FieldType_ReferenceType ¶
type FieldType_ReferenceType struct {
// resource this string is referring to.
// It can have two possible format: either short version like "Shelf", or fully qualified
// like library.goten.com/Shelf - note the first part is not proto package, but service domain.
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// Defined behaviour of the referencing resource if referenced is deleted.
TargetDeleteBehavior OnReferencedObjectDeleted `` /* 173-byte string literal not displayed */
// contains filtered or unexported fields
}
Reference to another resource. This type can only be used for fields in objects defined in proto package containing Goten service definition (ServicePackage - goten.annotations.service_pkg). Unlike name type, Go object generated for reference also has reference to potentially resolved resource itself. This type should be used inside resources objects - reference types are picked by schema engine provided by Goten.
func (*FieldType_ReferenceType) Descriptor
deprecated
func (*FieldType_ReferenceType) Descriptor() ([]byte, []int)
Deprecated: Use FieldType_ReferenceType.ProtoReflect.Descriptor instead.
func (*FieldType_ReferenceType) GetResource ¶
func (x *FieldType_ReferenceType) GetResource() string
func (*FieldType_ReferenceType) GetTargetDeleteBehavior ¶
func (x *FieldType_ReferenceType) GetTargetDeleteBehavior() OnReferencedObjectDeleted
func (*FieldType_ReferenceType) ProtoMessage ¶
func (*FieldType_ReferenceType) ProtoMessage()
func (*FieldType_ReferenceType) ProtoReflect ¶
func (x *FieldType_ReferenceType) ProtoReflect() protoreflect.Message
func (*FieldType_ReferenceType) Reset ¶
func (x *FieldType_ReferenceType) Reset()
func (*FieldType_ReferenceType) String ¶
func (x *FieldType_ReferenceType) String() string
type GoPackage ¶
type GoPackage struct {
// Name of the package
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Path where generated files are stored
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
// contains filtered or unexported fields
}
Go package configuration
func (*GoPackage) Descriptor
deprecated
func (*GoPackage) ProtoMessage ¶
func (*GoPackage) ProtoMessage()
func (*GoPackage) ProtoReflect ¶
func (x *GoPackage) ProtoReflect() protoreflect.Message
type MergeOpts ¶
type MergeOpts struct {
// Types that are assignable to Opts:
//
// *MergeOpts_Repeated_
// *MergeOpts_Map_
Opts isMergeOpts_Opts `protobuf_oneof:"opts"`
// contains filtered or unexported fields
}
Describes how goten should merge given field within a containing proto message. Merge is an operation, where an "original object" is a message to which we merge to, "source object" is a message we merge from. In result, original object is modified and contains all data from source object while source object is left untouched.
func (*MergeOpts) Descriptor
deprecated
func (*MergeOpts) GetMap ¶
func (x *MergeOpts) GetMap() *MergeOpts_Map
func (*MergeOpts) GetRepeated ¶
func (x *MergeOpts) GetRepeated() *MergeOpts_Repeated
func (*MergeOpts) ProtoMessage ¶
func (*MergeOpts) ProtoMessage()
func (*MergeOpts) ProtoReflect ¶
func (x *MergeOpts) ProtoReflect() protoreflect.Message
type MergeOpts_FieldBehavior ¶
type MergeOpts_FieldBehavior int32
Points to a rules used during merging of a map or repeated field. Repeated field, however, is not that different from a map at all. Reasons: * If a developer specifies unique identifier from fields taken from array item, then it is effectively a map (See Repeated:identifiers field in this MergeOpts annotation). * If repeated field is a list of primitive elements like strings, ints, or even list of simple objects like timestamps (repeated int array_of_ints, repeated string array_of_ints, repeated google.protobuf.Timestamp array_of_timestamps), then it can be considered as a map again: map<int, dummy> former_array_of_ints, map<string, dummy> former_array_of_strings etc. In those cases, array fields should be considered as both key and values! All FieldBehavior options below should be treated having above in mind. When you see "container" in any description below, it should be considered as a map or repeated.
const ( // Fields by keys present in both containers are merged. // Fields only in a source container are added, fields only in a destination // container are retained. MergeOpts_DEFAULT MergeOpts_FieldBehavior = 0 // Source container simply replaces destination without any merge operation. MergeOpts_REPLACE MergeOpts_FieldBehavior = 1 // Fields by map keys present in both containers are merged. // Fields only in a source are added, fields only in a destination are // removed. MergeOpts_DISCARD_ONLY_IN_DEST MergeOpts_FieldBehavior = 2 // Fields by map keys present in both objects are merged. // Fields only in a source map are ignored, fields only in a destination map // are retained. MergeOpts_DISCARD_ONLY_IN_SOURCE MergeOpts_FieldBehavior = 3 // Fields present only in both source and destination containers are // retained and values are merged. Otherwise discarded. MergeOpts_OPERATION_AND MergeOpts_FieldBehavior = 4 // Fields present in both source and destination containers are discarded. // Only unique keys present in one of the them are stored in final // destination object. MergeOpts_OPERATION_XOR MergeOpts_FieldBehavior = 5 // This behavior indicates no merging operation, elements from source list // are simple appended. This rule cannot be used on repeated fields for // which we specified unique identifier AND maps. This rule is only // additional for repeated fields with primitive elements which can repeat // many times. MergeOpts_APPEND MergeOpts_FieldBehavior = 6 )
func (MergeOpts_FieldBehavior) Descriptor ¶
func (MergeOpts_FieldBehavior) Descriptor() protoreflect.EnumDescriptor
func (MergeOpts_FieldBehavior) Enum ¶
func (x MergeOpts_FieldBehavior) Enum() *MergeOpts_FieldBehavior
func (MergeOpts_FieldBehavior) EnumDescriptor
deprecated
func (MergeOpts_FieldBehavior) EnumDescriptor() ([]byte, []int)
Deprecated: Use MergeOpts_FieldBehavior.Descriptor instead.
func (MergeOpts_FieldBehavior) Number ¶
func (x MergeOpts_FieldBehavior) Number() protoreflect.EnumNumber
func (MergeOpts_FieldBehavior) String ¶
func (x MergeOpts_FieldBehavior) String() string
func (MergeOpts_FieldBehavior) Type ¶
func (MergeOpts_FieldBehavior) Type() protoreflect.EnumType
type MergeOpts_Map ¶
type MergeOpts_Map struct {
// Instructs goten how map field should be merged.
Behavior MergeOpts_FieldBehavior `protobuf:"varint,1,opt,name=behavior,proto3,enum=goten.annotations.MergeOpts_FieldBehavior" json:"behavior,omitempty"`
// contains filtered or unexported fields
}
Merge rules applicable for map fields.
func (*MergeOpts_Map) Descriptor
deprecated
func (*MergeOpts_Map) Descriptor() ([]byte, []int)
Deprecated: Use MergeOpts_Map.ProtoReflect.Descriptor instead.
func (*MergeOpts_Map) GetBehavior ¶
func (x *MergeOpts_Map) GetBehavior() MergeOpts_FieldBehavior
func (*MergeOpts_Map) ProtoMessage ¶
func (*MergeOpts_Map) ProtoMessage()
func (*MergeOpts_Map) ProtoReflect ¶
func (x *MergeOpts_Map) ProtoReflect() protoreflect.Message
func (*MergeOpts_Map) Reset ¶
func (x *MergeOpts_Map) Reset()
func (*MergeOpts_Map) String ¶
func (x *MergeOpts_Map) String() string
type MergeOpts_Map_ ¶
type MergeOpts_Map_ struct {
// Settings applicable for map fields
Map *MergeOpts_Map `protobuf:"bytes,2,opt,name=map,proto3,oneof"`
}
type MergeOpts_Repeated ¶
type MergeOpts_Repeated struct {
// Unique identifiers of an array item.
// For example, for field "repeated Container containers"
// identifiers could be equal to ["name"]. Such an array
// would be then treated like map<string, Container>.
// Option valid only if array item is a message, not primitive.
Identifiers []string `protobuf:"bytes,1,rep,name=identifiers,proto3" json:"identifiers,omitempty"`
// Instructs goten how repeated field should be merged.
Behavior MergeOpts_FieldBehavior `protobuf:"varint,2,opt,name=behavior,proto3,enum=goten.annotations.MergeOpts_FieldBehavior" json:"behavior,omitempty"`
// Instructs whether repeated field should be sorted after
// merge and how.
Sorting MergeOpts_Repeated_SortingOrder `protobuf:"varint,3,opt,name=sorting,proto3,enum=goten.annotations.MergeOpts_Repeated_SortingOrder" json:"sorting,omitempty"`
// contains filtered or unexported fields
}
Merge rules applicable to repeated fields. Repeated field can be classified as:
- Primitive (string, integer, float, reference...)
- Object (proto message) where each item has unique identifier (repeated Container, where Container has "string name" field inside). For short, we can call this "identified object".
- Object (proto message) where items dont have unique identifiers. For short, we can call this "plain object".
func (*MergeOpts_Repeated) Descriptor
deprecated
func (*MergeOpts_Repeated) Descriptor() ([]byte, []int)
Deprecated: Use MergeOpts_Repeated.ProtoReflect.Descriptor instead.
func (*MergeOpts_Repeated) GetBehavior ¶
func (x *MergeOpts_Repeated) GetBehavior() MergeOpts_FieldBehavior
func (*MergeOpts_Repeated) GetIdentifiers ¶
func (x *MergeOpts_Repeated) GetIdentifiers() []string
func (*MergeOpts_Repeated) GetSorting ¶
func (x *MergeOpts_Repeated) GetSorting() MergeOpts_Repeated_SortingOrder
func (*MergeOpts_Repeated) ProtoMessage ¶
func (*MergeOpts_Repeated) ProtoMessage()
func (*MergeOpts_Repeated) ProtoReflect ¶
func (x *MergeOpts_Repeated) ProtoReflect() protoreflect.Message
func (*MergeOpts_Repeated) Reset ¶
func (x *MergeOpts_Repeated) Reset()
func (*MergeOpts_Repeated) String ¶
func (x *MergeOpts_Repeated) String() string
type MergeOpts_Repeated_ ¶
type MergeOpts_Repeated_ struct {
// Settings applicable for repeated fields
Repeated *MergeOpts_Repeated `protobuf:"bytes,1,opt,name=repeated,proto3,oneof"`
}
type MergeOpts_Repeated_SortingOrder ¶
type MergeOpts_Repeated_SortingOrder int32
Tells how repeated field should be sorted after merge.
const ( // No sorting MergeOpts_Repeated_NO_SORTING MergeOpts_Repeated_SortingOrder = 0 // Ascending order. // - For primitive fields, values are sorted // ascending by their value // - For objects with identifiers, values // are sorted ascending by their identifiers // alphabetically. // - Invalid (goten will raise an error) for // objects without specified identifiers. MergeOpts_Repeated_ASCENDING MergeOpts_Repeated_SortingOrder = 1 // Descending order. // - For primitive fields, values are sorted // descending by their value // - For objects with identifiers, values // are sorted descending by their identifiers // alphabetically. // - Invalid (goten will raise an error) for // objects without specified identifiers. MergeOpts_Repeated_DESCENDING MergeOpts_Repeated_SortingOrder = 2 )
func (MergeOpts_Repeated_SortingOrder) Descriptor ¶
func (MergeOpts_Repeated_SortingOrder) Descriptor() protoreflect.EnumDescriptor
func (MergeOpts_Repeated_SortingOrder) Enum ¶
func (x MergeOpts_Repeated_SortingOrder) Enum() *MergeOpts_Repeated_SortingOrder
func (MergeOpts_Repeated_SortingOrder) EnumDescriptor
deprecated
func (MergeOpts_Repeated_SortingOrder) EnumDescriptor() ([]byte, []int)
Deprecated: Use MergeOpts_Repeated_SortingOrder.Descriptor instead.
func (MergeOpts_Repeated_SortingOrder) Number ¶
func (x MergeOpts_Repeated_SortingOrder) Number() protoreflect.EnumNumber
func (MergeOpts_Repeated_SortingOrder) String ¶
func (x MergeOpts_Repeated_SortingOrder) String() string
func (MergeOpts_Repeated_SortingOrder) Type ¶
func (MergeOpts_Repeated_SortingOrder) Type() protoreflect.EnumType
type OnReferencedObjectDeleted ¶
type OnReferencedObjectDeleted int32
Defines behaviour of reference holder when referenced object has been deleted
const ( // Not allowed to be used. OnReferencedObjectDeleted_UNDEFINED OnReferencedObjectDeleted = 0 // Blocks referenced object from being deleted OnReferencedObjectDeleted_BLOCK OnReferencedObjectDeleted = 1 // Set reference to empty value if it belongs to same database, but in other cases it may be done // in asynchronous manner (for example, if referenced resource belongs to different service). OnReferencedObjectDeleted_UNSET OnReferencedObjectDeleted = 2 // Deletion of referenced object causes reference owner to be also deleted if they belong to // same database, otherwise it may be done in asynchronous manner (for example, if referenced // resource belongs to different service). OnReferencedObjectDeleted_CASCADE_DELETE OnReferencedObjectDeleted = 3 // Deletion of referenced object causes reference to be set to empty value. OnReferencedObjectDeleted_ASYNC_UNSET OnReferencedObjectDeleted = 4 // Deletion of referenced object causes reference owner to be also deleted by garbage collector OnReferencedObjectDeleted_ASYNC_CASCADE_DELETE OnReferencedObjectDeleted = 5 // Reference holder does nothing - reference is kept dangling. // This option allows custom code to be used for handling reference // owners. OnReferencedObjectDeleted_ALLOW_DANGLING OnReferencedObjectDeleted = 6 )
func (OnReferencedObjectDeleted) Descriptor ¶
func (OnReferencedObjectDeleted) Descriptor() protoreflect.EnumDescriptor
func (OnReferencedObjectDeleted) Enum ¶
func (x OnReferencedObjectDeleted) Enum() *OnReferencedObjectDeleted
func (OnReferencedObjectDeleted) EnumDescriptor
deprecated
func (OnReferencedObjectDeleted) EnumDescriptor() ([]byte, []int)
Deprecated: Use OnReferencedObjectDeleted.Descriptor instead.
func (OnReferencedObjectDeleted) Number ¶
func (x OnReferencedObjectDeleted) Number() protoreflect.EnumNumber
func (OnReferencedObjectDeleted) String ¶
func (x OnReferencedObjectDeleted) String() string
func (OnReferencedObjectDeleted) Type ¶
func (OnReferencedObjectDeleted) Type() protoreflect.EnumType