Documentation
¶
Index ¶
- Variables
- func ActionIsArbitraryFunction(action *Action) booldeprecated
- func ActionIsFunction(action *Action) booldeprecated
- func EnumExists(enums []*Enum, name string) bool
- func FieldNames(m *Model) []stringdeprecated
- func GetActionNamesForApi(p *Schema, api *Api) []string
- func IsBelongsTo(field *Field) booldeprecated
- func IsHasMany(field *Field) booldeprecated
- func IsHasOne(field *Field) booldeprecated
- func IsReadAction(action *Action) booldeprecated
- func IsRepeated(field *Field) booldeprecated
- func IsTypeModel(field *Field) booldeprecated
- func IsWriteAction(action *Action) booldeprecated
- func MessageUsedAsResponse(schema *Schema, msgName string) bool
- func ModelExists(models []*Model, name string) bool
- func ModelNames(p *Schema) []stringdeprecated
- func PrimaryKeyFieldName(model *Model) stringdeprecated
- type Action
- func (*Action) Descriptor() ([]byte, []int)deprecated
- func (x *Action) GetFacets() []string
- func (x *Action) GetImplementation() ActionImplementation
- func (x *Action) GetInputMessageName() string
- func (x *Action) GetModelName() string
- func (x *Action) GetName() string
- func (x *Action) GetOrderBy() []*OrderByStatement
- func (x *Action) GetPermissions() []*PermissionRule
- func (x *Action) GetResponseEmbeds() []string
- func (x *Action) GetResponseMessageName() string
- func (x *Action) GetSetExpressions() []*Expression
- func (x *Action) GetType() ActionType
- func (x *Action) GetValidationExpressions() []*Expression
- func (x *Action) GetWhereExpressions() []*Expression
- func (a *Action) IsArbitraryFunction() bool
- func (a *Action) IsCreate() bool
- func (a *Action) IsDelete() bool
- func (a *Action) IsFunction() bool
- func (a *Action) IsGet() bool
- func (a *Action) IsList() bool
- func (a *Action) IsReadAction() bool
- func (a *Action) IsUpdate() bool
- func (a *Action) IsWriteAction() bool
- func (*Action) ProtoMessage()
- func (x *Action) ProtoReflect() protoreflect.Message
- func (x *Action) Reset()
- func (x *Action) String() string
- type ActionImplementation
- func (ActionImplementation) Descriptor() protoreflect.EnumDescriptor
- func (x ActionImplementation) Enum() *ActionImplementation
- func (ActionImplementation) EnumDescriptor() ([]byte, []int)deprecated
- func (x ActionImplementation) Number() protoreflect.EnumNumber
- func (x ActionImplementation) String() string
- func (ActionImplementation) Type() protoreflect.EnumType
- type ActionType
- type Api
- type ApiModel
- func (*ApiModel) Descriptor() ([]byte, []int)deprecated
- func (x *ApiModel) GetModelActions() []*ApiModelAction
- func (x *ApiModel) GetModelName() string
- func (*ApiModel) ProtoMessage()
- func (x *ApiModel) ProtoReflect() protoreflect.Message
- func (x *ApiModel) Reset()
- func (x *ApiModel) String() string
- type ApiModelAction
- type DefaultValue
- func (*DefaultValue) Descriptor() ([]byte, []int)deprecated
- func (x *DefaultValue) GetExpression() *Expression
- func (x *DefaultValue) GetUseZeroValue() bool
- func (*DefaultValue) ProtoMessage()
- func (x *DefaultValue) ProtoReflect() protoreflect.Message
- func (x *DefaultValue) Reset()
- func (x *DefaultValue) String() string
- type Entity
- type Enum
- type EnumValue
- type EnvironmentVariable
- func (*EnvironmentVariable) Descriptor() ([]byte, []int)deprecated
- func (x *EnvironmentVariable) GetName() string
- func (x *EnvironmentVariable) GetRequired() bool
- func (*EnvironmentVariable) ProtoMessage()
- func (x *EnvironmentVariable) ProtoReflect() protoreflect.Message
- func (x *EnvironmentVariable) Reset()
- func (x *EnvironmentVariable) String() string
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetActionType() ActionType
- func (x *Event) GetModelName() string
- func (x *Event) GetName() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type Expression
- type Field
- func (*Field) Descriptor() ([]byte, []int)deprecated
- func (x *Field) GetComputedExpression() *Expression
- func (x *Field) GetDefaultValue() *DefaultValue
- func (x *Field) GetEntityName() string
- func (x *Field) GetForeignKeyFieldName() *wrapperspb.StringValue
- func (x *Field) GetForeignKeyInfo() *ForeignKeyInfo
- func (x *Field) GetInverseFieldName() *wrapperspb.StringValue
- func (x *Field) GetName() string
- func (x *Field) GetOptional() bool
- func (x *Field) GetPrimaryKey() bool
- func (x *Field) GetSequence() *Sequence
- func (x *Field) GetType() *TypeInfo
- func (x *Field) GetUnique() bool
- func (x *Field) GetUniqueWith() []string
- func (f *Field) IsBelongsTo() bool
- func (f *Field) IsFile() bool
- func (f *Field) IsForeignKey() bool
- func (f *Field) IsHasMany() bool
- func (f *Field) IsHasOne() bool
- func (f *Field) IsRepeated() bool
- func (f *Field) IsTypeModel() bool
- func (*Field) ProtoMessage()
- func (x *Field) ProtoReflect() protoreflect.Message
- func (x *Field) Reset()
- func (x *Field) String() string
- type Flow
- func (*Flow) Descriptor() ([]byte, []int)deprecated
- func (x *Flow) GetInputMessageName() string
- func (x *Flow) GetName() string
- func (x *Flow) GetPermissions() []*PermissionRule
- func (x *Flow) GetSchedule() *Schedule
- func (*Flow) ProtoMessage()
- func (x *Flow) ProtoReflect() protoreflect.Message
- func (x *Flow) Reset()
- func (x *Flow) String() string
- type ForeignKeyInfo
- func (*ForeignKeyInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ForeignKeyInfo) GetRelatedEntityField() string
- func (x *ForeignKeyInfo) GetRelatedEntityName() string
- func (*ForeignKeyInfo) ProtoMessage()
- func (x *ForeignKeyInfo) ProtoReflect() protoreflect.Message
- func (x *ForeignKeyInfo) Reset()
- func (x *ForeignKeyInfo) String() string
- type HttpMethod
- type Job
- func (*Job) Descriptor() ([]byte, []int)deprecated
- func (x *Job) GetInputMessageName() string
- func (x *Job) GetName() string
- func (x *Job) GetPermissions() []*PermissionRule
- func (x *Job) GetSchedule() *Schedule
- func (*Job) ProtoMessage()
- func (x *Job) ProtoReflect() protoreflect.Message
- func (x *Job) Reset()
- func (x *Job) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (m *Message) FindField(fieldName string) *MessageField
- func (x *Message) GetFields() []*MessageField
- func (x *Message) GetName() string
- func (m *Message) GetOrderByField() *MessageField
- func (x *Message) GetType() *TypeInfo
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MessageField
- func (*MessageField) Descriptor() ([]byte, []int)deprecated
- func (x *MessageField) GetMessageName() string
- func (x *MessageField) GetName() string
- func (x *MessageField) GetNullable() bool
- func (x *MessageField) GetOptional() bool
- func (x *MessageField) GetTarget() []string
- func (x *MessageField) GetType() *TypeInfo
- func (f *MessageField) IsFile() bool
- func (f *MessageField) IsMessage() bool
- func (f *MessageField) IsModelField() bool
- func (*MessageField) ProtoMessage()
- func (x *MessageField) ProtoReflect() protoreflect.Message
- func (x *MessageField) Reset()
- func (x *MessageField) String() string
- type Model
- func (*Model) Descriptor() ([]byte, []int)deprecated
- func (m *Model) FieldNames() []string
- func (m *Model) FileFields() []*Field
- func (m *Model) FindField(name string) *Field
- func (m *Model) ForeignKeyFields() []*Field
- func (x *Model) GetActions() []*Action
- func (m *Model) GetComputedFields() []*Field
- func (x *Model) GetFields() []*Field
- func (x *Model) GetName() string
- func (x *Model) GetPermissions() []*PermissionRule
- func (m *Model) HasField(field string) bool
- func (m *Model) HasFiles() bool
- func (m *Model) PrimaryKeyFieldName() string
- func (*Model) ProtoMessage()
- func (x *Model) ProtoReflect() protoreflect.Message
- func (x *Model) Reset()
- func (x *Model) String() string
- type OrderByStatement
- func (*OrderByStatement) Descriptor() ([]byte, []int)deprecated
- func (x *OrderByStatement) GetDirection() OrderDirection
- func (x *OrderByStatement) GetFieldName() string
- func (*OrderByStatement) ProtoMessage()
- func (x *OrderByStatement) ProtoReflect() protoreflect.Message
- func (x *OrderByStatement) Reset()
- func (x *OrderByStatement) String() string
- type OrderDirection
- func (OrderDirection) Descriptor() protoreflect.EnumDescriptor
- func (x OrderDirection) Enum() *OrderDirection
- func (OrderDirection) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderDirection) Number() protoreflect.EnumNumber
- func (x OrderDirection) String() string
- func (OrderDirection) Type() protoreflect.EnumType
- type PermissionFilter
- type PermissionRule
- func PermissionsForAction(schema *Schema, action *Action, filters ...PermissionFilter) (permissions []*PermissionRule)
- func PermissionsForActionType(schema *Schema, modelName string, actionType ActionType) []*PermissionRule
- func PermissionsWithExpression(permissions []*PermissionRule) []*PermissionRule
- func PermissionsWithRole(permissions []*PermissionRule) []*PermissionRule
- func (*PermissionRule) Descriptor() ([]byte, []int)deprecated
- func (x *PermissionRule) GetActionName() *wrapperspb.StringValue
- func (x *PermissionRule) GetActionTypes() []ActionType
- func (x *PermissionRule) GetEntityName() string
- func (x *PermissionRule) GetExpression() *Expression
- func (x *PermissionRule) GetRoleNames() []string
- func (*PermissionRule) ProtoMessage()
- func (x *PermissionRule) ProtoReflect() protoreflect.Message
- func (x *PermissionRule) Reset()
- func (x *PermissionRule) String() string
- type Role
- type Route
- func (*Route) Descriptor() ([]byte, []int)deprecated
- func (x *Route) GetHandler() string
- func (x *Route) GetMethod() HttpMethod
- func (x *Route) GetPattern() string
- func (*Route) ProtoMessage()
- func (x *Route) ProtoReflect() protoreflect.Message
- func (x *Route) Reset()
- func (x *Route) String() string
- type Schedule
- type Schema
- func (s *Schema) AllFields() []*Field
- func (*Schema) Descriptor() ([]byte, []int)deprecated
- func (s *Schema) Entities() []Entity
- func (s *Schema) FilterActions(filter func(op *Action) bool) (ops []*Action)
- func (s *Schema) FindAction(actionName string) *Action
- func (s *Schema) FindApiNames(modelName, actionName string) []string
- func (s *Schema) FindEntity(entityName string) Entity
- func (s *Schema) FindEnum(enumName string) *Enum
- func (s *Schema) FindEventSubscribers(event *Event) []*Subscriber
- func (s *Schema) FindFlow(flowName string) *Flow
- func (s *Schema) FindJob(name string) *Job
- func (s *Schema) FindMessage(messageName string) *Message
- func (s *Schema) FindModel(modelName string) *Model
- func (s *Schema) FindTask(name string) *Task
- func (s *Schema) FlowNames() []string
- func (s *Schema) GetAllFlows() []*Flow
- func (x *Schema) GetApis() []*Api
- func (x *Schema) GetEnums() []*Enum
- func (x *Schema) GetEnvironmentVariables() []*EnvironmentVariable
- func (x *Schema) GetEvents() []*Event
- func (s *Schema) GetFlowModelInputs(f *Flow) map[string]bool
- func (x *Schema) GetFlows() []*Flow
- func (s *Schema) GetForeignKeyFieldName(field *Field) string
- func (x *Schema) GetJobs() []*Job
- func (x *Schema) GetMessages() []*Message
- func (x *Schema) GetModels() []*Model
- func (x *Schema) GetRoles() []*Role
- func (x *Schema) GetRoutes() []*Route
- func (x *Schema) GetSecrets() []*Secret
- func (x *Schema) GetSubscribers() []*Subscriber
- func (x *Schema) GetTasks() []*Task
- func (s *Schema) HasFiles() bool
- func (s *Schema) HasFlows() bool
- func (s *Schema) HasScheduledFlows() bool
- func (s *Schema) IsActionInputMessage(messageName string) bool
- func (s *Schema) IsActionResponseMessage(messageName string) bool
- func (s *Schema) ModelNames() []string
- func (*Schema) ProtoMessage()
- func (x *Schema) ProtoReflect() protoreflect.Message
- func (x *Schema) Reset()
- func (s *Schema) ScheduledFlowNames() []string
- func (s *Schema) ScheduledFlows() []*Flow
- func (x *Schema) String() string
- func (s *Schema) TaskNames() []string
- type Secret
- type Sequence
- type Subscriber
- func (*Subscriber) Descriptor() ([]byte, []int)deprecated
- func (x *Subscriber) GetEventNames() []string
- func (x *Subscriber) GetInputMessageName() string
- func (x *Subscriber) GetName() string
- func (*Subscriber) ProtoMessage()
- func (x *Subscriber) ProtoReflect() protoreflect.Message
- func (x *Subscriber) Reset()
- func (x *Subscriber) String() string
- type Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (t *Task) FieldNames() []string
- func (t *Task) FindField(name string) *Field
- func (t *Task) ForeignKeyFields() []*Field
- func (t *Task) GetComputedFields() []*Field
- func (x *Task) GetFields() []*Field
- func (t *Task) GetFlow() *Flow
- func (x *Task) GetInputMessageName() string
- func (x *Task) GetName() string
- func (x *Task) GetOrderBy() []*OrderByStatement
- func (x *Task) GetPermissions() []*PermissionRule
- func (t *Task) HasField(field string) bool
- func (t *Task) PrimaryKeyFieldName() string
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- type Type
- type TypeInfo
- func (*TypeInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TypeInfo) GetEntityName() *wrapperspb.StringValue
- func (x *TypeInfo) GetEnumName() *wrapperspb.StringValue
- func (x *TypeInfo) GetFieldName() *wrapperspb.StringValue
- func (x *TypeInfo) GetMessageName() *wrapperspb.StringValue
- func (x *TypeInfo) GetRepeated() bool
- func (x *TypeInfo) GetStringLiteralValue() *wrapperspb.StringValue
- func (x *TypeInfo) GetType() Type
- func (x *TypeInfo) GetUnionNames() []*wrapperspb.StringValue
- func (*TypeInfo) ProtoMessage()
- func (x *TypeInfo) ProtoReflect() protoreflect.Message
- func (x *TypeInfo) Reset()
- func (x *TypeInfo) String() string
Constants ¶
This section is empty.
Variables ¶
var ( ActionImplementation_name = map[int32]string{ 0: "ACTION_IMPLEMENTATION_UNKNOWN", 1: "ACTION_IMPLEMENTATION_AUTO", 2: "ACTION_IMPLEMENTATION_CUSTOM", 3: "ACTION_IMPLEMENTATION_RUNTIME", } ActionImplementation_value = map[string]int32{ "ACTION_IMPLEMENTATION_UNKNOWN": 0, "ACTION_IMPLEMENTATION_AUTO": 1, "ACTION_IMPLEMENTATION_CUSTOM": 2, "ACTION_IMPLEMENTATION_RUNTIME": 3, } )
Enum value maps for ActionImplementation.
var ( ActionType_name = map[int32]string{ 0: "ACTION_TYPE_UNKNOWN", 1: "ACTION_TYPE_CREATE", 2: "ACTION_TYPE_GET", 3: "ACTION_TYPE_LIST", 4: "ACTION_TYPE_UPDATE", 5: "ACTION_TYPE_DELETE", 6: "ACTION_TYPE_READ", 7: "ACTION_TYPE_WRITE", } ActionType_value = map[string]int32{ "ACTION_TYPE_UNKNOWN": 0, "ACTION_TYPE_CREATE": 1, "ACTION_TYPE_GET": 2, "ACTION_TYPE_LIST": 3, "ACTION_TYPE_UPDATE": 4, "ACTION_TYPE_DELETE": 5, "ACTION_TYPE_READ": 6, "ACTION_TYPE_WRITE": 7, } )
Enum value maps for ActionType.
var ( Type_name = map[int32]string{ 0: "TYPE_UNKNOWN", 1: "TYPE_STRING", 2: "TYPE_BOOL", 3: "TYPE_INT", 4: "TYPE_TIMESTAMP", 5: "TYPE_DATE", 6: "TYPE_ID", 7: "TYPE_ENTITY", 8: "TYPE_CURRENCY", 9: "TYPE_DATETIME", 10: "TYPE_ENUM", 12: "TYPE_IMAGE", 13: "TYPE_OBJECT", 14: "TYPE_SECRET", 15: "TYPE_PASSWORD", 16: "TYPE_MESSAGE", 17: "TYPE_ANY", 18: "TYPE_SORT_DIRECTION", 19: "TYPE_UNION", 20: "TYPE_STRING_LITERAL", 21: "TYPE_MARKDOWN", 22: "TYPE_DECIMAL", 23: "TYPE_VECTOR", 24: "TYPE_FILE", 25: "TYPE_RELATIVE_PERIOD", 26: "TYPE_DURATION", } Type_value = map[string]int32{ "TYPE_UNKNOWN": 0, "TYPE_STRING": 1, "TYPE_BOOL": 2, "TYPE_INT": 3, "TYPE_TIMESTAMP": 4, "TYPE_DATE": 5, "TYPE_ID": 6, "TYPE_ENTITY": 7, "TYPE_CURRENCY": 8, "TYPE_DATETIME": 9, "TYPE_ENUM": 10, "TYPE_IMAGE": 12, "TYPE_OBJECT": 13, "TYPE_SECRET": 14, "TYPE_PASSWORD": 15, "TYPE_MESSAGE": 16, "TYPE_ANY": 17, "TYPE_SORT_DIRECTION": 18, "TYPE_UNION": 19, "TYPE_STRING_LITERAL": 20, "TYPE_MARKDOWN": 21, "TYPE_DECIMAL": 22, "TYPE_VECTOR": 23, "TYPE_FILE": 24, "TYPE_RELATIVE_PERIOD": 25, "TYPE_DURATION": 26, } )
Enum value maps for Type.
var ( OrderDirection_name = map[int32]string{ 0: "ORDER_DIRECTION_UNKNOWN", 1: "ORDER_DIRECTION_ASCENDING", 2: "ORDER_DIRECTION_DECENDING", } OrderDirection_value = map[string]int32{ "ORDER_DIRECTION_UNKNOWN": 0, "ORDER_DIRECTION_ASCENDING": 1, "ORDER_DIRECTION_DECENDING": 2, } )
Enum value maps for OrderDirection.
var ( HttpMethod_name = map[int32]string{ 0: "HTTP_METHOD_UNKNOWN", 1: "HTTP_METHOD_GET", 2: "HTTP_METHOD_POST", 3: "HTTP_METHOD_PUT", 4: "HTTP_METHOD_DELETE", } HttpMethod_value = map[string]int32{ "HTTP_METHOD_UNKNOWN": 0, "HTTP_METHOD_GET": 1, "HTTP_METHOD_POST": 2, "HTTP_METHOD_PUT": 3, "HTTP_METHOD_DELETE": 4, } )
Enum value maps for HttpMethod.
var File_proto_schema_proto protoreflect.FileDescriptor
Functions ¶
func ActionIsArbitraryFunction
deprecated
func ActionIsFunction
deprecated
func EnumExists ¶
EnumExists returns true if the given schema contains a enum with the given name.
func FieldNames
deprecated
func GetActionNamesForApi ¶
GetActionNamesForApi returns all the actions available on an API.
func IsBelongsTo
deprecated
func IsReadAction
deprecated
func IsRepeated
deprecated
func IsTypeModel
deprecated
func IsWriteAction
deprecated
func MessageUsedAsResponse ¶
func ModelExists ¶
ModelsExists returns true if the given schema contains a model with the given name.
func ModelNames
deprecated
func PrimaryKeyFieldName
deprecated
Types ¶
type Action ¶
type Action struct {
// The name of the model this action belongs to.
ModelName string `protobuf:"bytes,1,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"`
// The name of the action. Must be in lowerCamelCase and be unique across all actions
// across all models within the schema. This is because in both RPC and GraphQL actions
// are top-level and so two different models can't both define an actions with the same name.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The type of this action.
Type ActionType `protobuf:"varint,3,opt,name=type,proto3,enum=proto.ActionType" json:"type,omitempty"`
// Whether this action will be auto-generated by Keel or implemented with a function.
Implementation ActionImplementation `protobuf:"varint,4,opt,name=implementation,proto3,enum=proto.ActionImplementation" json:"implementation,omitempty"`
// A list of permission rules to apply to this action
Permissions []*PermissionRule `protobuf:"bytes,6,rep,name=permissions,proto3" json:"permissions,omitempty"`
// A list of assignment expression to be executed as part of this action.
// Only valid in `type` is ACTION_TYPE_CREATE or ACTION_TYPE_UPDATE
SetExpressions []*Expression `protobuf:"bytes,7,rep,name=set_expressions,json=setExpressions,proto3" json:"set_expressions,omitempty"`
// A list of logical expressions to be applied to the database query being
// executed as part of the action.
// Not valid if `type` is ACTION_TYPE_CREATE
// If there are multiple entries in this field they are AND'd.
WhereExpressions []*Expression `protobuf:"bytes,8,rep,name=where_expressions,json=whereExpressions,proto3" json:"where_expressions,omitempty"`
// A list of expressions that perform some kind of validation (likely on the inputs).
ValidationExpressions []*Expression `protobuf:"bytes,9,rep,name=validation_expressions,json=validationExpressions,proto3" json:"validation_expressions,omitempty"`
// A ordered list of order by statements.
OrderBy []*OrderByStatement `protobuf:"bytes,10,rep,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
// The name of the input message type for this action.
// This can be an empty string if there are no inputs and therefore no input message.
InputMessageName string `protobuf:"bytes,11,opt,name=input_message_name,json=inputMessageName,proto3" json:"input_message_name,omitempty"`
// The name of the response message type for this action when not a built-in action. This is because
// built-in action responses are determined by the action type (get, list, create, update, delete).
ResponseMessageName string `protobuf:"bytes,12,opt,name=response_message_name,json=responseMessageName,proto3" json:"response_message_name,omitempty"`
// Embedded data can be attached to the response message of built in actions (get, list).
ResponseEmbeds []string `protobuf:"bytes,13,rep,name=response_embeds,json=responseEmbeds,proto3" json:"response_embeds,omitempty"`
// Field names to facet on as defined with @facet in the schema.
Facets []string `protobuf:"bytes,14,rep,name=facets,proto3" json:"facets,omitempty"`
// contains filtered or unexported fields
}
func FilterActions
deprecated
func FindAction
deprecated
func (*Action) Descriptor
deprecated
func (*Action) GetImplementation ¶
func (x *Action) GetImplementation() ActionImplementation
func (*Action) GetInputMessageName ¶
func (*Action) GetModelName ¶
func (*Action) GetOrderBy ¶
func (x *Action) GetOrderBy() []*OrderByStatement
func (*Action) GetPermissions ¶
func (x *Action) GetPermissions() []*PermissionRule
func (*Action) GetResponseEmbeds ¶ added in v0.388.0
func (*Action) GetResponseMessageName ¶
func (*Action) GetSetExpressions ¶
func (x *Action) GetSetExpressions() []*Expression
func (*Action) GetType ¶
func (x *Action) GetType() ActionType
func (*Action) GetValidationExpressions ¶
func (x *Action) GetValidationExpressions() []*Expression
func (*Action) GetWhereExpressions ¶
func (x *Action) GetWhereExpressions() []*Expression
func (*Action) IsArbitraryFunction ¶ added in v0.393.1
func (*Action) IsFunction ¶ added in v0.393.1
func (*Action) IsReadAction ¶ added in v0.393.1
func (*Action) IsWriteAction ¶ added in v0.393.1
func (*Action) ProtoMessage ¶
func (*Action) ProtoMessage()
func (*Action) ProtoReflect ¶
func (x *Action) ProtoReflect() protoreflect.Message
type ActionImplementation ¶
type ActionImplementation int32
Describes where and by which party the implementation for an action is provided.
const ( ActionImplementation_ACTION_IMPLEMENTATION_UNKNOWN ActionImplementation = 0 // Auto means the implementation of the action is generated by Keel based on the // specified action type (get, create, update, list, delete) ActionImplementation_ACTION_IMPLEMENTATION_AUTO ActionImplementation = 1 // Custom means the implementation of the action is provided via custom functions code. // The code itself is not represented in this proto schema. ActionImplementation_ACTION_IMPLEMENTATION_CUSTOM ActionImplementation = 2 // Runtime means the implementation of the action is provided in the runtime code. ActionImplementation_ACTION_IMPLEMENTATION_RUNTIME ActionImplementation = 3 )
func (ActionImplementation) Descriptor ¶
func (ActionImplementation) Descriptor() protoreflect.EnumDescriptor
func (ActionImplementation) Enum ¶
func (x ActionImplementation) Enum() *ActionImplementation
func (ActionImplementation) EnumDescriptor
deprecated
func (ActionImplementation) EnumDescriptor() ([]byte, []int)
Deprecated: Use ActionImplementation.Descriptor instead.
func (ActionImplementation) Number ¶
func (x ActionImplementation) Number() protoreflect.EnumNumber
func (ActionImplementation) String ¶
func (x ActionImplementation) String() string
func (ActionImplementation) Type ¶
func (ActionImplementation) Type() protoreflect.EnumType
type ActionType ¶
type ActionType int32
Describes the behaviour of an action and a preordained input and output specification.
const ( ActionType_ACTION_TYPE_UNKNOWN ActionType = 0 // Creates a new record and returns it. ActionType_ACTION_TYPE_CREATE ActionType = 1 // Returns a single record by looking up on a unique field. ActionType_ACTION_TYPE_GET ActionType = 2 // Lists records optionally filtering on certain fields. The response would be a // an object that supports pagination functionality and contains a "page" of results. ActionType_ACTION_TYPE_LIST ActionType = 3 // Update a single record by providing a unique lookup and some fields to update. // The resulting record is returned. ActionType_ACTION_TYPE_UPDATE ActionType = 4 // Delete a record and returns it's ID. ActionType_ACTION_TYPE_DELETE ActionType = 5 // A generic read action. ActionType_ACTION_TYPE_READ ActionType = 6 // A generic write action. ActionType_ACTION_TYPE_WRITE ActionType = 7 )
func (ActionType) Descriptor ¶
func (ActionType) Descriptor() protoreflect.EnumDescriptor
func (ActionType) Enum ¶
func (x ActionType) Enum() *ActionType
func (ActionType) EnumDescriptor
deprecated
func (ActionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ActionType.Descriptor instead.
func (ActionType) Number ¶
func (x ActionType) Number() protoreflect.EnumNumber
func (ActionType) String ¶
func (x ActionType) String() string
func (ActionType) Type ¶
func (ActionType) Type() protoreflect.EnumType
type Api ¶
type Api struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
ApiModels []*ApiModel `protobuf:"bytes,3,rep,name=api_models,json=apiModels,proto3" json:"api_models,omitempty"`
// contains filtered or unexported fields
}
func (*Api) Descriptor
deprecated
func (*Api) GetApiModels ¶
func (*Api) ProtoMessage ¶
func (*Api) ProtoMessage()
func (*Api) ProtoReflect ¶
func (x *Api) ProtoReflect() protoreflect.Message
type ApiModel ¶
type ApiModel struct {
ModelName string `protobuf:"bytes,1,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"`
ModelActions []*ApiModelAction `protobuf:"bytes,2,rep,name=model_actions,json=modelActions,proto3" json:"model_actions,omitempty"`
// contains filtered or unexported fields
}
func (*ApiModel) Descriptor
deprecated
func (*ApiModel) GetModelActions ¶ added in v0.377.0
func (x *ApiModel) GetModelActions() []*ApiModelAction
func (*ApiModel) GetModelName ¶
func (*ApiModel) ProtoMessage ¶
func (*ApiModel) ProtoMessage()
func (*ApiModel) ProtoReflect ¶
func (x *ApiModel) ProtoReflect() protoreflect.Message
type ApiModelAction ¶ added in v0.377.0
type ApiModelAction struct {
ActionName string `protobuf:"bytes,1,opt,name=action_name,json=actionName,proto3" json:"action_name,omitempty"`
// contains filtered or unexported fields
}
func (*ApiModelAction) Descriptor
deprecated
added in
v0.377.0
func (*ApiModelAction) Descriptor() ([]byte, []int)
Deprecated: Use ApiModelAction.ProtoReflect.Descriptor instead.
func (*ApiModelAction) GetActionName ¶ added in v0.377.0
func (x *ApiModelAction) GetActionName() string
func (*ApiModelAction) ProtoMessage ¶ added in v0.377.0
func (*ApiModelAction) ProtoMessage()
func (*ApiModelAction) ProtoReflect ¶ added in v0.377.0
func (x *ApiModelAction) ProtoReflect() protoreflect.Message
func (*ApiModelAction) Reset ¶ added in v0.377.0
func (x *ApiModelAction) Reset()
func (*ApiModelAction) String ¶ added in v0.377.0
func (x *ApiModelAction) String() string
type DefaultValue ¶
type DefaultValue struct {
// If true then a "zero" value is used for the field, for example
// a string has a zero value of "" and a date has a zero value of
// today
UseZeroValue bool `protobuf:"varint,1,opt,name=use_zero_value,json=useZeroValue,proto3" json:"use_zero_value,omitempty"`
// This can be used to explicitly set the default value
Expression *Expression `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"`
// contains filtered or unexported fields
}
func (*DefaultValue) Descriptor
deprecated
func (*DefaultValue) Descriptor() ([]byte, []int)
Deprecated: Use DefaultValue.ProtoReflect.Descriptor instead.
func (*DefaultValue) GetExpression ¶
func (x *DefaultValue) GetExpression() *Expression
func (*DefaultValue) GetUseZeroValue ¶
func (x *DefaultValue) GetUseZeroValue() bool
func (*DefaultValue) ProtoMessage ¶
func (*DefaultValue) ProtoMessage()
func (*DefaultValue) ProtoReflect ¶
func (x *DefaultValue) ProtoReflect() protoreflect.Message
func (*DefaultValue) Reset ¶
func (x *DefaultValue) Reset()
func (*DefaultValue) String ¶
func (x *DefaultValue) String() string
type Enum ¶
type Enum struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Values []*EnumValue `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
func (*Enum) Descriptor
deprecated
func (*Enum) ProtoMessage ¶
func (*Enum) ProtoMessage()
func (*Enum) ProtoReflect ¶
func (x *Enum) ProtoReflect() protoreflect.Message
type EnumValue ¶
type EnumValue struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*EnumValue) Descriptor
deprecated
func (*EnumValue) ProtoMessage ¶
func (*EnumValue) ProtoMessage()
func (*EnumValue) ProtoReflect ¶
func (x *EnumValue) ProtoReflect() protoreflect.Message
type EnvironmentVariable ¶
type EnvironmentVariable struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"`
// contains filtered or unexported fields
}
func (*EnvironmentVariable) Descriptor
deprecated
func (*EnvironmentVariable) Descriptor() ([]byte, []int)
Deprecated: Use EnvironmentVariable.ProtoReflect.Descriptor instead.
func (*EnvironmentVariable) GetName ¶
func (x *EnvironmentVariable) GetName() string
func (*EnvironmentVariable) GetRequired ¶
func (x *EnvironmentVariable) GetRequired() bool
func (*EnvironmentVariable) ProtoMessage ¶
func (*EnvironmentVariable) ProtoMessage()
func (*EnvironmentVariable) ProtoReflect ¶
func (x *EnvironmentVariable) ProtoReflect() protoreflect.Message
func (*EnvironmentVariable) Reset ¶
func (x *EnvironmentVariable) Reset()
func (*EnvironmentVariable) String ¶
func (x *EnvironmentVariable) String() string
type Event ¶
type Event struct {
// The name of this event, for example: account.created
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The name of the model.
ModelName string `protobuf:"bytes,2,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"`
// Action type (create, update or delete).
ActionType ActionType `protobuf:"varint,3,opt,name=action_type,json=actionType,proto3,enum=proto.ActionType" json:"action_type,omitempty"`
// contains filtered or unexported fields
}
Events that can be triggered based on what has been defined in the schema. At the moment, we only support model-level events for create, update and delete mutations. This can be extended to support other kinds of events.
func (*Event) Descriptor
deprecated
func (*Event) GetActionType ¶
func (x *Event) GetActionType() ActionType
func (*Event) GetModelName ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type Expression ¶
type Expression struct {
Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
// contains filtered or unexported fields
}
func (*Expression) Descriptor
deprecated
func (*Expression) Descriptor() ([]byte, []int)
Deprecated: Use Expression.ProtoReflect.Descriptor instead.
func (*Expression) GetSource ¶
func (x *Expression) GetSource() string
func (*Expression) ProtoMessage ¶
func (*Expression) ProtoMessage()
func (*Expression) ProtoReflect ¶
func (x *Expression) ProtoReflect() protoreflect.Message
func (*Expression) Reset ¶
func (x *Expression) Reset()
func (*Expression) String ¶
func (x *Expression) String() string
type Field ¶
type Field struct {
// The name of the model or task this field belongs to.
EntityName string `protobuf:"bytes,1,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"`
// The name of the field. Must be in lowerCamelCase and be unique within the model or task.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Info regarding the type of this field
Type *TypeInfo `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
// If true then this field is allowed to be null
Optional bool `protobuf:"varint,4,opt,name=optional,proto3" json:"optional,omitempty"`
// If true then this field will have a unique constraint added to it meaning
// a given value can only exist in a single row.
// Cannot be true if `type.repeated` is true
Unique bool `protobuf:"varint,5,opt,name=unique,proto3" json:"unique,omitempty"`
// If set then this field is part of a compount unique constraint with the
// fields listed. The fields must be part of the same model and they must
// list this field in their unique_with value.
UniqueWith []string `protobuf:"bytes,8,rep,name=unique_with,json=uniqueWith,proto3" json:"unique_with,omitempty"`
// If true then this field will be set as the primary key for the parent model
PrimaryKey bool `protobuf:"varint,7,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"`
// If this field is of type TYPE_ENTITY then this field indicates which field on _this_
// entity is the foriegn key. This field should always be populated on the many side of a
// one-to-many relationship and on the unique side of a one-to-one.
ForeignKeyFieldName *wrapperspb.StringValue `protobuf:"bytes,10,opt,name=foreign_key_field_name,json=foreignKeyFieldName,proto3" json:"foreign_key_field_name,omitempty"`
// This describes how the default value of this field should be created
DefaultValue *DefaultValue `protobuf:"bytes,9,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
// This only applies to the foreign key fields that we auto inject.
// If it is non null it *defines* this field as being a foreign key field,
// and carries corresponding metadata.
ForeignKeyInfo *ForeignKeyInfo `protobuf:"bytes,11,opt,name=foreign_key_info,json=foreignKeyInfo,proto3" json:"foreign_key_info,omitempty"`
// If this field is of type ENTITY and the related entity has an inverse field
// to this one, then this field is set to that field name.
// For example if a Post model has a field called author which is of type Author,
// and then Author has posts which is of type Post, on the Post.author field this
// value will be "posts" and on the Author.posts field this value will be "author".
InverseFieldName *wrapperspb.StringValue `protobuf:"bytes,12,opt,name=inverse_field_name,json=inverseFieldName,proto3" json:"inverse_field_name,omitempty"`
// If computed then this field will contain the expression that will be evaluated to
// determine the value of the field at runtime.
ComputedExpression *Expression `protobuf:"bytes,13,opt,name=computed_expression,json=computedExpression,proto3" json:"computed_expression,omitempty"`
// If this field is a sequence this contains information about how the sequence value should be generated
Sequence *Sequence `protobuf:"bytes,14,opt,name=sequence,proto3" json:"sequence,omitempty"`
// contains filtered or unexported fields
}
func FacetFields ¶ added in v0.405.0
FacetFields returns the fields that are used for faceting for this action.
func ForeignKeyFields
deprecated
func (*Field) Descriptor
deprecated
func (*Field) GetComputedExpression ¶ added in v0.400.0
func (x *Field) GetComputedExpression() *Expression
func (*Field) GetDefaultValue ¶
func (x *Field) GetDefaultValue() *DefaultValue
func (*Field) GetEntityName ¶ added in v0.417.0
func (*Field) GetForeignKeyFieldName ¶
func (x *Field) GetForeignKeyFieldName() *wrapperspb.StringValue
func (*Field) GetForeignKeyInfo ¶
func (x *Field) GetForeignKeyInfo() *ForeignKeyInfo
func (*Field) GetInverseFieldName ¶
func (x *Field) GetInverseFieldName() *wrapperspb.StringValue
func (*Field) GetOptional ¶
func (*Field) GetPrimaryKey ¶
func (*Field) GetSequence ¶ added in v0.410.2
func (*Field) GetUniqueWith ¶
func (*Field) IsBelongsTo ¶ added in v0.393.1
func (*Field) IsForeignKey ¶ added in v0.394.2
func (*Field) IsRepeated ¶ added in v0.393.1
IsTypeRepeated returns true if the field is specified as being "repeated".
func (*Field) IsTypeModel ¶ added in v0.393.1
IsTypeModel returns true of the field's type is Model.
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) ProtoReflect ¶
func (x *Field) ProtoReflect() protoreflect.Message
type Flow ¶ added in v0.413.1
type Flow struct {
// The name of the flow.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The inputs defined on the flow.
InputMessageName string `protobuf:"bytes,2,opt,name=input_message_name,json=inputMessageName,proto3" json:"input_message_name,omitempty"`
// A permission rule which need to be satisfied in order to run the flow.
Permissions []*PermissionRule `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"`
// The schedule as an crontab expression.
Schedule *Schedule `protobuf:"bytes,4,opt,name=schedule,proto3" json:"schedule,omitempty"`
// contains filtered or unexported fields
}
func (*Flow) Descriptor
deprecated
added in
v0.413.1
func (*Flow) GetInputMessageName ¶ added in v0.413.1
func (*Flow) GetPermissions ¶ added in v0.413.1
func (x *Flow) GetPermissions() []*PermissionRule
func (*Flow) GetSchedule ¶ added in v0.415.3
func (*Flow) ProtoMessage ¶ added in v0.413.1
func (*Flow) ProtoMessage()
func (*Flow) ProtoReflect ¶ added in v0.413.1
func (x *Flow) ProtoReflect() protoreflect.Message
type ForeignKeyInfo ¶
type ForeignKeyInfo struct {
RelatedEntityName string `protobuf:"bytes,1,opt,name=related_entity_name,json=relatedEntityName,proto3" json:"related_entity_name,omitempty"`
RelatedEntityField string `protobuf:"bytes,2,opt,name=related_entity_field,json=relatedEntityField,proto3" json:"related_entity_field,omitempty"`
// contains filtered or unexported fields
}
func (*ForeignKeyInfo) Descriptor
deprecated
func (*ForeignKeyInfo) Descriptor() ([]byte, []int)
Deprecated: Use ForeignKeyInfo.ProtoReflect.Descriptor instead.
func (*ForeignKeyInfo) GetRelatedEntityField ¶ added in v0.417.0
func (x *ForeignKeyInfo) GetRelatedEntityField() string
func (*ForeignKeyInfo) GetRelatedEntityName ¶ added in v0.417.0
func (x *ForeignKeyInfo) GetRelatedEntityName() string
func (*ForeignKeyInfo) ProtoMessage ¶
func (*ForeignKeyInfo) ProtoMessage()
func (*ForeignKeyInfo) ProtoReflect ¶
func (x *ForeignKeyInfo) ProtoReflect() protoreflect.Message
func (*ForeignKeyInfo) Reset ¶
func (x *ForeignKeyInfo) Reset()
func (*ForeignKeyInfo) String ¶
func (x *ForeignKeyInfo) String() string
type HttpMethod ¶ added in v0.405.2
type HttpMethod int32
const ( HttpMethod_HTTP_METHOD_UNKNOWN HttpMethod = 0 HttpMethod_HTTP_METHOD_GET HttpMethod = 1 HttpMethod_HTTP_METHOD_POST HttpMethod = 2 HttpMethod_HTTP_METHOD_PUT HttpMethod = 3 HttpMethod_HTTP_METHOD_DELETE HttpMethod = 4 )
func (HttpMethod) Descriptor ¶ added in v0.405.2
func (HttpMethod) Descriptor() protoreflect.EnumDescriptor
func (HttpMethod) Enum ¶ added in v0.405.2
func (x HttpMethod) Enum() *HttpMethod
func (HttpMethod) EnumDescriptor
deprecated
added in
v0.405.2
func (HttpMethod) EnumDescriptor() ([]byte, []int)
Deprecated: Use HttpMethod.Descriptor instead.
func (HttpMethod) Number ¶ added in v0.405.2
func (x HttpMethod) Number() protoreflect.EnumNumber
func (HttpMethod) String ¶ added in v0.405.2
func (x HttpMethod) String() string
func (HttpMethod) Type ¶ added in v0.405.2
func (HttpMethod) Type() protoreflect.EnumType
type Job ¶
type Job struct {
// The name of the job.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The inputs defined on the job.
InputMessageName string `protobuf:"bytes,2,opt,name=input_message_name,json=inputMessageName,proto3" json:"input_message_name,omitempty"`
// A permission rule which need to be satisfied in order to run the job.
Permissions []*PermissionRule `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"`
// The schedule as an crontab expression.
Schedule *Schedule `protobuf:"bytes,4,opt,name=schedule,proto3" json:"schedule,omitempty"`
// contains filtered or unexported fields
}
func (*Job) Descriptor
deprecated
func (*Job) GetInputMessageName ¶
func (*Job) GetPermissions ¶
func (x *Job) GetPermissions() []*PermissionRule
func (*Job) GetSchedule ¶
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
type Message ¶
type Message struct {
// Name of the input or response message. Either generated from built-in
// actions, hard-coded into the runtime (e.g. AuthenticateResponseMessage),
// or specified in the schema using the message keyword.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The input or response fields for this message.
Fields []*MessageField `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
// The message could be a Keel type and not an object.
// Cannot be provided along with fields.
Type *TypeInfo `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
// contains filtered or unexported fields
}
func FindMessage
deprecated
func FindValuesInputMessage ¶
For built-in action types, returns the "values" input message, which may be nested inside the root message for some action types, or returns nil if not found.
func FindWhereInputMessage ¶
For built-in action types, returns the "where" input message, which may be nested inside the root message for some action types, or returns nil if not found.
func (*Message) Descriptor
deprecated
func (*Message) FindField ¶ added in v0.393.1
func (m *Message) FindField(fieldName string) *MessageField
func (*Message) GetFields ¶
func (x *Message) GetFields() []*MessageField
func (*Message) GetOrderByField ¶ added in v0.394.2
func (m *Message) GetOrderByField() *MessageField
GetOrderByField returns the orderBy message field, if it has any; otherwise returns nil;.
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type MessageField ¶
type MessageField struct {
// Name of the parent message.
MessageName string `protobuf:"bytes,1,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"`
// Name of the field.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The type of this field.
Type *TypeInfo `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
// Set to true if this can be omitted.
Optional bool `protobuf:"varint,4,opt,name=optional,proto3" json:"optional,omitempty"`
// Set to true if this can be set to the null value.
Nullable bool `protobuf:"varint,6,opt,name=nullable,proto3" json:"nullable,omitempty"`
// Only valid for implicit inputs on built-in actions (ACTION_IMPLEMENTATION_AUTO)
// This field can be set to a path, from the current entity, to a field that should
// be read from or written to automatically by the runtime.
// As an example if the parent model had a field called `item` which was a relationship to
// an `Item` model which itself had a field called `price`, and this input wanted to filter
// on the item price, then the value of `target` would be ["item", "price"].
Target []string `protobuf:"bytes,5,rep,name=target,proto3" json:"target,omitempty"`
// contains filtered or unexported fields
}
func FindMessageField
deprecated
func FindMessageField(message *Message, fieldName string) *MessageField
Deprecated: Use Message.FindField() instead.
func (*MessageField) Descriptor
deprecated
func (*MessageField) Descriptor() ([]byte, []int)
Deprecated: Use MessageField.ProtoReflect.Descriptor instead.
func (*MessageField) GetMessageName ¶
func (x *MessageField) GetMessageName() string
func (*MessageField) GetName ¶
func (x *MessageField) GetName() string
func (*MessageField) GetNullable ¶
func (x *MessageField) GetNullable() bool
func (*MessageField) GetOptional ¶
func (x *MessageField) GetOptional() bool
func (*MessageField) GetTarget ¶
func (x *MessageField) GetTarget() []string
func (*MessageField) GetType ¶
func (x *MessageField) GetType() *TypeInfo
func (*MessageField) IsFile ¶ added in v0.389.0
func (f *MessageField) IsFile() bool
IsFile tells us if the field is a file.
func (*MessageField) IsMessage ¶ added in v0.394.2
func (f *MessageField) IsMessage() bool
IsMessage checks if the field is a message itself.
func (*MessageField) IsModelField ¶
func (f *MessageField) IsModelField() bool
IsModelField returns true if the input targets a model field and is handled automatically by the runtime. This will only be true for inputs that are built-in actions, as functions never have this behaviour.
func (*MessageField) ProtoMessage ¶
func (*MessageField) ProtoMessage()
func (*MessageField) ProtoReflect ¶
func (x *MessageField) ProtoReflect() protoreflect.Message
func (*MessageField) Reset ¶
func (x *MessageField) Reset()
func (*MessageField) String ¶
func (x *MessageField) String() string
type Model ¶
type Model struct {
// The name of the model. Must be in PascalCase and be unique within the schema.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The fields this model contains
Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
// The actions this model defines. Contains both actions that will be auto
// generated and also functions
Actions []*Action `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"`
Permissions []*PermissionRule `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"`
// contains filtered or unexported fields
}
func FindModels ¶
FindModels locates and returns the models whose names match up with those specified in the given names to find.
func (*Model) Descriptor
deprecated
func (*Model) FieldNames ¶ added in v0.393.1
FieldNames provides a (sorted) list of the fields in the model of the given name.
func (*Model) FileFields ¶ added in v0.388.0
FileFields will return a slice of fields for the model that are of type file.
func (*Model) FindField ¶ added in v0.400.0
FindField returns the field with the given name on the given model.
func (*Model) ForeignKeyFields ¶ added in v0.393.1
ForeignKeyFields returns all the fields in the given model which have their ForeignKeyInfo populated.
func (*Model) GetActions ¶
func (*Model) GetComputedFields ¶ added in v0.400.0
GetComputedFields returns all the computed fields on the given model.
func (*Model) GetPermissions ¶
func (x *Model) GetPermissions() []*PermissionRule
func (*Model) HasField ¶ added in v0.417.0
HasField returns true if the model has a field of the given name.
func (*Model) HasFiles ¶ added in v0.388.0
HasFiles checks if the model has any fields that are files.
func (*Model) PrimaryKeyFieldName ¶ added in v0.393.1
PrimaryKeyFieldName returns the name of the field in the given model, that is marked as being the model's primary key. (Or empty string).
func (*Model) ProtoMessage ¶
func (*Model) ProtoMessage()
func (*Model) ProtoReflect ¶
func (x *Model) ProtoReflect() protoreflect.Message
type OrderByStatement ¶
type OrderByStatement struct {
// The name of the field to perform ordering on.
FieldName string `protobuf:"bytes,1,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
// The direction in which to order.
Direction OrderDirection `protobuf:"varint,2,opt,name=direction,proto3,enum=proto.OrderDirection" json:"direction,omitempty"`
// contains filtered or unexported fields
}
func (*OrderByStatement) Descriptor
deprecated
func (*OrderByStatement) Descriptor() ([]byte, []int)
Deprecated: Use OrderByStatement.ProtoReflect.Descriptor instead.
func (*OrderByStatement) GetDirection ¶
func (x *OrderByStatement) GetDirection() OrderDirection
func (*OrderByStatement) GetFieldName ¶
func (x *OrderByStatement) GetFieldName() string
func (*OrderByStatement) ProtoMessage ¶
func (*OrderByStatement) ProtoMessage()
func (*OrderByStatement) ProtoReflect ¶
func (x *OrderByStatement) ProtoReflect() protoreflect.Message
func (*OrderByStatement) Reset ¶
func (x *OrderByStatement) Reset()
func (*OrderByStatement) String ¶
func (x *OrderByStatement) String() string
type OrderDirection ¶
type OrderDirection int32
const ( OrderDirection_ORDER_DIRECTION_UNKNOWN OrderDirection = 0 OrderDirection_ORDER_DIRECTION_ASCENDING OrderDirection = 1 OrderDirection_ORDER_DIRECTION_DECENDING OrderDirection = 2 )
func (OrderDirection) Descriptor ¶
func (OrderDirection) Descriptor() protoreflect.EnumDescriptor
func (OrderDirection) Enum ¶
func (x OrderDirection) Enum() *OrderDirection
func (OrderDirection) EnumDescriptor
deprecated
func (OrderDirection) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderDirection.Descriptor instead.
func (OrderDirection) Number ¶
func (x OrderDirection) Number() protoreflect.EnumNumber
func (OrderDirection) String ¶
func (x OrderDirection) String() string
func (OrderDirection) Type ¶
func (OrderDirection) Type() protoreflect.EnumType
type PermissionFilter ¶
type PermissionFilter = func(p *PermissionRule) bool
type PermissionRule ¶
type PermissionRule struct {
// Name of the entity this permission rule applies to
EntityName string `protobuf:"bytes,1,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"`
// Name of the specific action this permission rule applies to.
// If this field is populated then `action_types` is ignored.
ActionName *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=action_name,json=actionName,proto3" json:"action_name,omitempty"`
// A name of a Role that has been defined in the schema.
// Cannot be provided if `expression` is provided.
RoleNames []string `protobuf:"bytes,3,rep,name=role_names,json=roleNames,proto3" json:"role_names,omitempty"`
// An expression to evaluate at runtime.
// Cannot be provided if `role_name` is provided.
Expression *Expression `protobuf:"bytes,4,opt,name=expression,proto3" json:"expression,omitempty"`
// A list of action types that this permission rule applies to
// Should not be set if `action_name` is provided.
ActionTypes []ActionType `protobuf:"varint,5,rep,packed,name=action_types,json=actionTypes,proto3,enum=proto.ActionType" json:"action_types,omitempty"`
// contains filtered or unexported fields
}
func PermissionsForAction ¶
func PermissionsForAction(schema *Schema, action *Action, filters ...PermissionFilter) (permissions []*PermissionRule)
func PermissionsForActionType ¶
func PermissionsForActionType(schema *Schema, modelName string, actionType ActionType) []*PermissionRule
PermissionsForActionType returns a list of permissions defined for an action type on a model.
func PermissionsWithExpression ¶
func PermissionsWithExpression(permissions []*PermissionRule) []*PermissionRule
PermissionsWithExpression returns a list of those permission present in the given permissions list, which have at least one expression-based permission rule. This does not imply that the returned Permissions might not also have some role-based rules.
func PermissionsWithRole ¶
func PermissionsWithRole(permissions []*PermissionRule) []*PermissionRule
PermissionsWithRole returns a list of those permission present in the given permissions list, which have at least one Role-based permission rule. This does not imply that the returned Permissions might not also have some expression-based rules.
func (*PermissionRule) Descriptor
deprecated
func (*PermissionRule) Descriptor() ([]byte, []int)
Deprecated: Use PermissionRule.ProtoReflect.Descriptor instead.
func (*PermissionRule) GetActionName ¶
func (x *PermissionRule) GetActionName() *wrapperspb.StringValue
func (*PermissionRule) GetActionTypes ¶
func (x *PermissionRule) GetActionTypes() []ActionType
func (*PermissionRule) GetEntityName ¶ added in v0.417.0
func (x *PermissionRule) GetEntityName() string
func (*PermissionRule) GetExpression ¶
func (x *PermissionRule) GetExpression() *Expression
func (*PermissionRule) GetRoleNames ¶
func (x *PermissionRule) GetRoleNames() []string
func (*PermissionRule) ProtoMessage ¶
func (*PermissionRule) ProtoMessage()
func (*PermissionRule) ProtoReflect ¶
func (x *PermissionRule) ProtoReflect() protoreflect.Message
func (*PermissionRule) Reset ¶
func (x *PermissionRule) Reset()
func (*PermissionRule) String ¶
func (x *PermissionRule) String() string
type Role ¶
type Role struct {
// The name of the role
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// A list of domains to match for this role e.g. myorg.com
Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"`
// A list of specific email addresses to match for this role eg. sarah@myorg.com
Emails []string `protobuf:"bytes,3,rep,name=emails,proto3" json:"emails,omitempty"`
// contains filtered or unexported fields
}
func (*Role) Descriptor
deprecated
func (*Role) GetDomains ¶
func (*Role) ProtoMessage ¶
func (*Role) ProtoMessage()
func (*Role) ProtoReflect ¶
func (x *Role) ProtoReflect() protoreflect.Message
type Route ¶ added in v0.405.2
type Route struct {
Method HttpMethod `protobuf:"varint,1,opt,name=method,proto3,enum=proto.HttpMethod" json:"method,omitempty"`
Pattern string `protobuf:"bytes,2,opt,name=pattern,proto3" json:"pattern,omitempty"`
Handler string `protobuf:"bytes,3,opt,name=handler,proto3" json:"handler,omitempty"`
// contains filtered or unexported fields
}
func (*Route) Descriptor
deprecated
added in
v0.405.2
func (*Route) GetHandler ¶ added in v0.405.2
func (*Route) GetMethod ¶ added in v0.405.2
func (x *Route) GetMethod() HttpMethod
func (*Route) GetPattern ¶ added in v0.405.2
func (*Route) ProtoMessage ¶ added in v0.405.2
func (*Route) ProtoMessage()
func (*Route) ProtoReflect ¶ added in v0.405.2
func (x *Route) ProtoReflect() protoreflect.Message
type Schedule ¶
type Schedule struct {
Expression string `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"`
// contains filtered or unexported fields
}
func (*Schedule) Descriptor
deprecated
func (*Schedule) GetExpression ¶
func (*Schedule) ProtoMessage ¶
func (*Schedule) ProtoMessage()
func (*Schedule) ProtoReflect ¶
func (x *Schedule) ProtoReflect() protoreflect.Message
type Schema ¶
type Schema struct {
Models []*Model `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty"`
Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"`
Apis []*Api `protobuf:"bytes,3,rep,name=apis,proto3" json:"apis,omitempty"`
Enums []*Enum `protobuf:"bytes,4,rep,name=enums,proto3" json:"enums,omitempty"`
EnvironmentVariables []*EnvironmentVariable `protobuf:"bytes,5,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty"`
Messages []*Message `protobuf:"bytes,6,rep,name=messages,proto3" json:"messages,omitempty"`
Secrets []*Secret `protobuf:"bytes,7,rep,name=secrets,proto3" json:"secrets,omitempty"`
Jobs []*Job `protobuf:"bytes,8,rep,name=jobs,proto3" json:"jobs,omitempty"`
Subscribers []*Subscriber `protobuf:"bytes,9,rep,name=subscribers,proto3" json:"subscribers,omitempty"`
Events []*Event `protobuf:"bytes,10,rep,name=events,proto3" json:"events,omitempty"`
Routes []*Route `protobuf:"bytes,11,rep,name=routes,proto3" json:"routes,omitempty"`
Flows []*Flow `protobuf:"bytes,12,rep,name=flows,proto3" json:"flows,omitempty"`
Tasks []*Task `protobuf:"bytes,13,rep,name=tasks,proto3" json:"tasks,omitempty"`
// contains filtered or unexported fields
}
func (*Schema) AllFields ¶ added in v0.393.1
AllFields provides a list of all the model fields specified in the schema.
func (*Schema) Descriptor
deprecated
func (*Schema) Entities ¶ added in v0.417.0
Entities provides a (sorted) list of all the entities (models and tasks) used in the given schema.
func (*Schema) FilterActions ¶ added in v0.393.1
func (*Schema) FindAction ¶ added in v0.393.1
FindAction finds the action with the given name. Returns nil if action is not found.
func (*Schema) FindApiNames ¶ added in v0.395.7
FindApiNames finds the api name for the given model and action name.
func (*Schema) FindEntity ¶ added in v0.417.0
FindEntity finds within the schema the model or task that has the given name. Returns nil if model not found.
func (*Schema) FindEnum ¶ added in v0.413.1
FindEnum finds within the schema the enum that has the given name. Returns nil if enum not found.
func (*Schema) FindEventSubscribers ¶ added in v0.393.1
func (s *Schema) FindEventSubscribers(event *Event) []*Subscriber
FindEventSubscribers locates the subscribers for the given event.
func (*Schema) FindFlow ¶ added in v0.413.1
FindFlow finds the flow with the given name. Returns nil if a flow is not found. The matching is case insensitive.
func (*Schema) FindMessage ¶ added in v0.394.2
FindMessage finds within the schema the message that has the given name. Returns nil if message not found.
func (*Schema) FindModel ¶ added in v0.394.2
FindModel finds within the schema the model that has the given name. Returns nil if model not found.
func (*Schema) FindTask ¶ added in v0.418.0
FindTask finds the task with the given name. Returns nil if a task is not found. The matching is case insensitive.
func (*Schema) FlowNames ¶ added in v0.413.1
FlowNames returns an array with the names of all flows defined in this schema.
func (*Schema) GetAllFlows ¶ added in v0.418.0
GetAllFlows returns all the flows defined in the schema together with all the flows generated for tasks.
func (*Schema) GetEnvironmentVariables ¶
func (x *Schema) GetEnvironmentVariables() []*EnvironmentVariable
func (*Schema) GetFlowModelInputs ¶ added in v0.414.0
GetFlowModelInputs returns a map of model names that are used as inputs to the given flow. The boolean value represents whether the input is required or not.
func (*Schema) GetForeignKeyFieldName ¶ added in v0.417.0
GetForeignKeyFieldName returns the foreign key field name for the given field if it represents a relationship to another model. It returns an empty string if field's type is not a model. The foreign key returned might exists on field's parent model, or on the model field it is related to, so this function would normally be used in conjunction with IsBelongsTo or it's counterparts to determine on which side the foreign key lives.
func (*Schema) GetMessages ¶
func (*Schema) GetSecrets ¶
func (*Schema) GetSubscribers ¶
func (x *Schema) GetSubscribers() []*Subscriber
func (*Schema) HasFiles ¶ added in v0.388.0
HasFiles checks if the given schema has any models or messages with fields that are files.
func (*Schema) HasFlows ¶ added in v0.413.1
HasFlows indicates if the schema has any flows defined or any tasks that have flows.
func (*Schema) HasScheduledFlows ¶ added in v0.415.3
HasScheduledFlows checks if there are any scheduled flows defined.
func (*Schema) IsActionInputMessage ¶ added in v0.395.9
IsActionInputMessage returns true if the message is used to define an action's inputs.
func (*Schema) IsActionResponseMessage ¶ added in v0.395.9
IsActionResponseMessage returns true if the message is used to define an action's response.
func (*Schema) ModelNames ¶ added in v0.393.1
ModelNames provides a (sorted) list of all the Model names used in the given schema.
func (*Schema) ProtoMessage ¶
func (*Schema) ProtoMessage()
func (*Schema) ProtoReflect ¶
func (x *Schema) ProtoReflect() protoreflect.Message
func (*Schema) ScheduledFlowNames ¶ added in v0.415.3
ScheduledFlowNames returns an array with the names of all scheduled flows defined in this schema.
func (*Schema) ScheduledFlows ¶ added in v0.415.3
ScheduledFlows returns a slice of Flows that have schedules defined.
type Secret ¶
type Secret struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"`
// contains filtered or unexported fields
}
func (*Secret) Descriptor
deprecated
func (*Secret) GetRequired ¶
func (*Secret) ProtoMessage ¶
func (*Secret) ProtoMessage()
func (*Secret) ProtoReflect ¶
func (x *Secret) ProtoReflect() protoreflect.Message
type Sequence ¶ added in v0.410.2
type Sequence struct {
Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
StartsAt uint32 `protobuf:"varint,2,opt,name=starts_at,json=startsAt,proto3" json:"starts_at,omitempty"`
// contains filtered or unexported fields
}
func (*Sequence) Descriptor
deprecated
added in
v0.410.2
func (*Sequence) GetStartsAt ¶ added in v0.410.2
func (*Sequence) ProtoMessage ¶ added in v0.410.2
func (*Sequence) ProtoMessage()
func (*Sequence) ProtoReflect ¶ added in v0.410.2
func (x *Sequence) ProtoReflect() protoreflect.Message
type Subscriber ¶
type Subscriber struct {
// The name of the subscriber function. e.g. sendWelcomeMail.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The input message for this function.
// The structure of this is determined by the events handled by this subscriber.
InputMessageName string `protobuf:"bytes,2,opt,name=input_message_name,json=inputMessageName,proto3" json:"input_message_name,omitempty"`
// The events which are handled by this subscriber.
EventNames []string `protobuf:"bytes,3,rep,name=event_names,json=eventNames,proto3" json:"event_names,omitempty"`
// contains filtered or unexported fields
}
func FindEventSubscriptions
deprecated
added in
v0.368.0
func FindEventSubscriptions(schema *Schema, event *Event) []*Subscriber
FindEventSubscriptions locates the subscriber of the given name.
Deprecated: use Schema.FindEventSubscribers instead.
func FindSubscriber ¶
func FindSubscriber(subscribers []*Subscriber, name string) *Subscriber
FindSubscriber locates the subscriber of the given name.
func (*Subscriber) Descriptor
deprecated
func (*Subscriber) Descriptor() ([]byte, []int)
Deprecated: Use Subscriber.ProtoReflect.Descriptor instead.
func (*Subscriber) GetEventNames ¶
func (x *Subscriber) GetEventNames() []string
func (*Subscriber) GetInputMessageName ¶
func (x *Subscriber) GetInputMessageName() string
func (*Subscriber) GetName ¶
func (x *Subscriber) GetName() string
func (*Subscriber) ProtoMessage ¶
func (*Subscriber) ProtoMessage()
func (*Subscriber) ProtoReflect ¶
func (x *Subscriber) ProtoReflect() protoreflect.Message
func (*Subscriber) Reset ¶
func (x *Subscriber) Reset()
func (*Subscriber) String ¶
func (x *Subscriber) String() string
type Task ¶ added in v0.417.0
type Task struct {
// The name of the task. Must be in PascalCase and be unique within the schema.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The fields this task contains
Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
// A list of permission rules for this task.
Permissions []*PermissionRule `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"`
// A ordered list of order by statements.
OrderBy []*OrderByStatement `protobuf:"bytes,4,rep,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
// The message used to create a task; generated from the task's fields.
InputMessageName string `protobuf:"bytes,5,opt,name=input_message_name,json=inputMessageName,proto3" json:"input_message_name,omitempty"`
// contains filtered or unexported fields
}
func (*Task) Descriptor
deprecated
added in
v0.417.0
func (*Task) FieldNames ¶ added in v0.417.0
FieldNames provides a (sorted) list of the fields in the task of the given name.
func (*Task) FindField ¶ added in v0.417.0
FindField returns the field with the given name on the given task.
func (*Task) ForeignKeyFields ¶ added in v0.417.0
ForeignKeyFields returns all the fields in the given task which have their ForeignKeyInfo populated.
func (*Task) GetComputedFields ¶ added in v0.417.0
GetComputedFields returns all the computed fields on the given task.
func (*Task) GetFlow ¶ added in v0.418.0
GetFlow generates and returns the flow associated with this topic.
func (*Task) GetInputMessageName ¶ added in v0.418.0
func (*Task) GetOrderBy ¶ added in v0.418.0
func (x *Task) GetOrderBy() []*OrderByStatement
func (*Task) GetPermissions ¶ added in v0.417.0
func (x *Task) GetPermissions() []*PermissionRule
func (*Task) HasField ¶ added in v0.417.0
HasField returns true if the task has a field of the given name.
func (*Task) PrimaryKeyFieldName ¶ added in v0.417.0
PrimaryKeyFieldName returns the name of the field in the given task, that is marked as being the model's primary key. (Or empty string).
func (*Task) ProtoMessage ¶ added in v0.417.0
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶ added in v0.417.0
func (x *Task) ProtoReflect() protoreflect.Message
type Type ¶
type Type int32
const ( Type_TYPE_UNKNOWN Type = 0 Type_TYPE_STRING Type = 1 Type_TYPE_BOOL Type = 2 Type_TYPE_INT Type = 3 Type_TYPE_TIMESTAMP Type = 4 Type_TYPE_DATE Type = 5 Type_TYPE_ID Type = 6 Type_TYPE_ENTITY Type = 7 Type_TYPE_CURRENCY Type = 8 Type_TYPE_DATETIME Type = 9 Type_TYPE_ENUM Type = 10 Type_TYPE_IMAGE Type = 12 Type_TYPE_OBJECT Type = 13 // Used for sensitive data. Encrypted at rest, decrypted on read. Type_TYPE_SECRET Type = 14 // Used for hashing passwords and passcodes with the intention to verify admission. Type_TYPE_PASSWORD Type = 15 Type_TYPE_MESSAGE Type = 16 // Any is used in Message types to denote a field with any type. Type_TYPE_ANY Type = 17 // Used to specify a sort direction argument. Type_TYPE_SORT_DIRECTION Type = 18 // A union type describes a value that can be one of several types. // These types are listed in TypeInfo's Union_Names property. Type_TYPE_UNION Type = 19 // A string literal type which can be used to discriminate on in our Typescript types. // TYPE_INFO string_literal_type must also be set. Type_TYPE_STRING_LITERAL Type = 20 // Markdown rich text field. Type_TYPE_MARKDOWN Type = 21 // Decimal number type; fixed precision. Type_TYPE_DECIMAL Type = 22 // A vector type. Type_TYPE_VECTOR Type = 23 // A file storage type. Type_TYPE_FILE Type = 24 // A relative period expression string; e.g. `today/next year` Type_TYPE_RELATIVE_PERIOD Type = 25 // A time duration Type_TYPE_DURATION Type = 26 )
func (Type) Descriptor ¶
func (Type) Descriptor() protoreflect.EnumDescriptor
func (Type) EnumDescriptor
deprecated
func (Type) Number ¶
func (x Type) Number() protoreflect.EnumNumber
func (Type) Type ¶
func (Type) Type() protoreflect.EnumType
type TypeInfo ¶
type TypeInfo struct {
// The type of the field.
Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=proto.Type" json:"type,omitempty"`
// If `type` is set to TYPE_ENUM then this value is the name of the
// the enum that the type refers to.
EnumName *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=enum_name,json=enumName,proto3" json:"enum_name,omitempty"`
// If this field is set then this type is referring to another entity.
// In the case of TYPE_ENTITY this type _is_ the entity named here.
// In the case of other types e.g. TYPE_ID this type is referencing a field
// on the entity named here, and the specific field being referenced is indicated
// by `field_name`.
EntityName *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"`
// This field indicates which field on `entity_name` this type is referencing.
// This field should only be set if `entity_name` is set.
FieldName *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
// Only valid within a Message
MessageName *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"`
// If true then is type is an array of it's `type`
Repeated bool `protobuf:"varint,4,opt,name=repeated,proto3" json:"repeated,omitempty"`
// A union type describes a value that can be one of several types.
// When TypeInfo's type property is set to UNION, then any one of the type names
// listed here can be used as input. Currently only supports messages.
UnionNames []*wrapperspb.StringValue `protobuf:"bytes,7,rep,name=union_names,json=unionNames,proto3" json:"union_names,omitempty"`
// For types which are in a union, it is optional to provide a value to discriminate on.
// This is only useful in TypeScript type generation, where this will make type a string literal type.
StringLiteralValue *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=string_literal_value,json=stringLiteralValue,proto3" json:"string_literal_value,omitempty"`
// contains filtered or unexported fields
}
func (*TypeInfo) Descriptor
deprecated
func (*TypeInfo) GetEntityName ¶ added in v0.417.0
func (x *TypeInfo) GetEntityName() *wrapperspb.StringValue
func (*TypeInfo) GetEnumName ¶
func (x *TypeInfo) GetEnumName() *wrapperspb.StringValue
func (*TypeInfo) GetFieldName ¶
func (x *TypeInfo) GetFieldName() *wrapperspb.StringValue
func (*TypeInfo) GetMessageName ¶
func (x *TypeInfo) GetMessageName() *wrapperspb.StringValue
func (*TypeInfo) GetRepeated ¶
func (*TypeInfo) GetStringLiteralValue ¶ added in v0.368.0
func (x *TypeInfo) GetStringLiteralValue() *wrapperspb.StringValue
func (*TypeInfo) GetUnionNames ¶
func (x *TypeInfo) GetUnionNames() []*wrapperspb.StringValue
func (*TypeInfo) ProtoMessage ¶
func (*TypeInfo) ProtoMessage()
func (*TypeInfo) ProtoReflect ¶
func (x *TypeInfo) ProtoReflect() protoreflect.Message