Documentation ¶
Index ¶
- Variables
- func ActionIsArbitraryFunction(action *Action) bool
- func ActionIsFunction(action *Action) bool
- func EnumExists(enums []*Enum, name string) bool
- func FieldNames(m *Model) []string
- func GetActionNamesForApi(p *Schema, api *Api) []string
- func GetForignKeyFieldName(models []*Model, field *Field) string
- func IsBelongsTo(field *Field) bool
- func IsHasMany(field *Field) bool
- func IsHasOne(field *Field) bool
- func IsReadAction(action *Action) bool
- func IsRepeated(field *Field) bool
- func IsTypeModel(field *Field) bool
- func IsWriteAction(action *Action) bool
- func MessageUsedAsResponse(schema *Schema, msgName string) bool
- func ModelExists(models []*Model, name string) bool
- func ModelHasField(schema *Schema, model string, field string) bool
- func ModelNames(p *Schema) []string
- func PrimaryKeyFieldName(model *Model) string
- type Action
- func (*Action) Descriptor() ([]byte, []int)deprecated
- 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) GetResponseMessageName() string
- func (x *Action) GetSetExpressions() []*Expression
- func (x *Action) GetType() ActionType
- func (x *Action) GetValidationExpressions() []*Expression
- func (x *Action) GetWhereExpressions() []*Expression
- 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 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) GetDefaultValue() *DefaultValue
- func (x *Field) GetForeignKeyFieldName() *wrapperspb.StringValue
- func (x *Field) GetForeignKeyInfo() *ForeignKeyInfo
- func (x *Field) GetInverseFieldName() *wrapperspb.StringValue
- func (x *Field) GetModelName() string
- func (x *Field) GetName() string
- func (x *Field) GetOptional() bool
- func (x *Field) GetPrimaryKey() bool
- func (x *Field) GetType() *TypeInfo
- func (x *Field) GetUnique() bool
- func (x *Field) GetUniqueWith() []string
- func (*Field) ProtoMessage()
- func (x *Field) ProtoReflect() protoreflect.Message
- func (x *Field) Reset()
- func (x *Field) String() string
- type ForeignKeyInfo
- func (*ForeignKeyInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ForeignKeyInfo) GetRelatedModelField() string
- func (x *ForeignKeyInfo) GetRelatedModelName() string
- func (*ForeignKeyInfo) ProtoMessage()
- func (x *ForeignKeyInfo) ProtoReflect() protoreflect.Message
- func (x *ForeignKeyInfo) Reset()
- func (x *ForeignKeyInfo) String() string
- 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 (x *Message) GetFields() []*MessageField
- func (x *Message) GetName() string
- 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) 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 (x *Model) GetActions() []*Action
- func (x *Model) GetFields() []*Field
- func (x *Model) GetName() string
- func (x *Model) GetPermissions() []*PermissionRule
- 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) GetExpression() *Expression
- func (x *PermissionRule) GetModelName() string
- 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 Schedule
- type Schema
- func (*Schema) Descriptor() ([]byte, []int)deprecated
- func (x *Schema) GetApis() []*Api
- func (x *Schema) GetEnums() []*Enum
- func (x *Schema) GetEnvironmentVariables() []*EnvironmentVariable
- func (x *Schema) GetEvents() []*Event
- func (x *Schema) GetJobs() []*Job
- func (x *Schema) GetMessages() []*Message
- func (x *Schema) GetModels() []*Model
- func (x *Schema) GetRoles() []*Role
- func (x *Schema) GetSecrets() []*Secret
- func (x *Schema) GetSubscribers() []*Subscriber
- func (*Schema) ProtoMessage()
- func (x *Schema) ProtoReflect() protoreflect.Message
- func (x *Schema) Reset()
- func (x *Schema) String() string
- type Secret
- 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 Type
- type TypeInfo
- func (*TypeInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TypeInfo) GetEnumName() *wrapperspb.StringValue
- func (x *TypeInfo) GetFieldName() *wrapperspb.StringValue
- func (x *TypeInfo) GetMessageName() *wrapperspb.StringValue
- func (x *TypeInfo) GetModelName() *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_MODEL", 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", } 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_MODEL": 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, } )
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 File_proto_schema_proto protoreflect.FileDescriptor
Functions ¶
func ActionIsFunction ¶
func EnumExists ¶
EnumExists returns true if the given schema contains a enum with the given name.
func FieldNames ¶
FieldNames provides a (sorted) list of the fields in the model of the given name.
func GetActionNamesForApi ¶
GetActionNamesForApi returns all the actions available on an API.
func GetForignKeyFieldName ¶
GetForignKeyFieldName 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 IsBelongsTo ¶
func IsReadAction ¶
func IsRepeated ¶
IsTypeRepeated returns true if the field is specified as being "repeated".
func IsTypeModel ¶
IsTypeModel returns true of the field's type is Model.
func IsWriteAction ¶
func MessageUsedAsResponse ¶
func ModelExists ¶
ModelsExists returns true if the given schema contains a model with the given name.
func ModelHasField ¶
ModelHasField returns true IFF the schema contains a model of the given name AND that model has a field of the given name.
func ModelNames ¶
ModelNames provides a (sorted) list of all the Model names used in the given schema.
func PrimaryKeyFieldName ¶
PrimaryKeyFieldName returns the name of the field in the given model, that is marked as being the model's primary key. (Or empty string).
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. 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"` // contains filtered or unexported fields }
func FindAction ¶
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) 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) 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 this field belongs to. ModelName string `protobuf:"bytes,1,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"` // The name of the field. Must be in lowerCamelCase and be unique within the model. 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_MODEL then this field indicates which field on _this_ // model 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 MODEL and the related model 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"` // contains filtered or unexported fields }
func ForeignKeyFields ¶
ForeignKeyFields returns all the fields in the given model which have their ForeignKeyInfo populated.
func (*Field) Descriptor
deprecated
func (*Field) GetDefaultValue ¶
func (x *Field) GetDefaultValue() *DefaultValue
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) GetModelName ¶
func (*Field) GetOptional ¶
func (*Field) GetPrimaryKey ¶
func (*Field) GetUniqueWith ¶
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) ProtoReflect ¶
func (x *Field) ProtoReflect() protoreflect.Message
type ForeignKeyInfo ¶
type ForeignKeyInfo struct { RelatedModelName string `protobuf:"bytes,1,opt,name=related_model_name,json=relatedModelName,proto3" json:"related_model_name,omitempty"` RelatedModelField string `protobuf:"bytes,2,opt,name=related_model_field,json=relatedModelField,proto3" json:"related_model_field,omitempty"` // contains filtered or unexported fields }
func (*ForeignKeyInfo) Descriptor
deprecated
func (*ForeignKeyInfo) Descriptor() ([]byte, []int)
Deprecated: Use ForeignKeyInfo.ProtoReflect.Descriptor instead.
func (*ForeignKeyInfo) GetRelatedModelField ¶
func (x *ForeignKeyInfo) GetRelatedModelField() string
func (*ForeignKeyInfo) GetRelatedModelName ¶
func (x *ForeignKeyInfo) GetRelatedModelName() 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 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 ¶
FindMessage will find a message type defined in a Keel schema based on the name of the message e.g FindMessage("MyMessage") will return this node: message MyMessage {}
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) GetFields ¶
func (x *Message) GetFields() []*MessageField
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 model, 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 ¶
func FindMessageField(message *Message, fieldName string) *MessageField
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) 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) GetActions ¶
func (*Model) GetPermissions ¶
func (x *Model) GetPermissions() []*PermissionRule
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 model this permission rule applies to ModelName string `protobuf:"bytes,1,opt,name=model_name,json=modelName,proto3" json:"model_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) GetExpression ¶
func (x *PermissionRule) GetExpression() *Expression
func (*PermissionRule) GetModelName ¶
func (x *PermissionRule) GetModelName() string
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 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"` // contains filtered or unexported fields }
func (*Schema) Descriptor
deprecated
func (*Schema) GetEnvironmentVariables ¶
func (x *Schema) GetEnvironmentVariables() []*EnvironmentVariable
func (*Schema) GetMessages ¶
func (*Schema) GetSecrets ¶
func (*Schema) GetSubscribers ¶
func (x *Schema) GetSubscribers() []*Subscriber
func (*Schema) ProtoMessage ¶
func (*Schema) ProtoMessage()
func (*Schema) ProtoReflect ¶
func (x *Schema) ProtoReflect() protoreflect.Message
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 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 ¶ added in v0.368.0
func FindEventSubscriptions(schema *Schema, event *Event) []*Subscriber
FindSubscriber locates the subscriber of the given name.
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 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_MODEL 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 )
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 model. // In the case of TYPE_MODEL this type _is_ the model named here. // In the case of other types e.g. TYPE_ID this type is referencing a field // on the model named here, and the specific field being referenced is indicated // by `field_name`. ModelName *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"` // This field indicates which field on `model_name` this type is referencing. // This field should only be set if `model_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 support 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) 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) GetModelName ¶
func (x *TypeInfo) GetModelName() *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