 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- type ApiOperation
- type OperationRequest
- func (*OperationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *OperationRequest) GetApiVersion() string
- func (x *OperationRequest) GetBody() []byte
- func (x *OperationRequest) GetEntityId() string
- func (x *OperationRequest) GetEntityType() string
- func (x *OperationRequest) GetExpirationTimestamp() *timestamp.Timestamp
- func (x *OperationRequest) GetExtension() *any1.Any
- func (x *OperationRequest) GetHttpMethod() string
- func (x *OperationRequest) GetOperationId() string
- func (x *OperationRequest) GetOperationName() string
- func (x *OperationRequest) GetRetryCount() int32
- func (*OperationRequest) ProtoMessage()
- func (x *OperationRequest) ProtoReflect() protoreflect.Message
- func (x *OperationRequest) Reset()
- func (x *OperationRequest) String() string
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var File_operation_request_proto protoreflect.FileDescriptor
    Functions ¶
This section is empty.
Types ¶
type ApiOperation ¶
type ApiOperation interface {
	// Initialize the operation with any clients and variables that are required.
	// Can simply return itself after initializing all the required values.
	InitOperation(context.Context, *OperationRequest) (ApiOperation, *errors.AsyncError)
	// GuardConcurrency ensures that this operation is the latest operation that should be
	// running to modify the Entity. If it fails, it should return the AsyncError.
	GuardConcurrency(context.Context, entity.Entity) *errors.AsyncError
	// Run will simply run the operation logic required.
	Run(context.Context) *errors.AsyncError
	// Return the OperationRequest, which may be required by other functions and structs
	// that interact with the operation, such as the EntityController or the operation hooks
	// also ensuring that every operation stored their initial OperationRequest.
	GetOperationRequest() *OperationRequest
}
    ApiOperation is the interface all operations will need to implement.
type OperationRequest ¶
type OperationRequest struct {
	OperationName       string               `protobuf:"bytes,1,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"`                   // Name of the operation being processed. Used to match the ApiOperation with the right implementation.
	ApiVersion          string               `protobuf:"bytes,2,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"`                            // Specifies the version of the API the operation is associated with, ensuring compatibility.
	RetryCount          int32                `protobuf:"varint,3,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"`                           // Tracks the number of retries of the operation to prevent infinite looping or special logic around retries.
	OperationId         string               `protobuf:"bytes,4,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`                         // A unique identifier for the operation.
	EntityId            string               `protobuf:"bytes,5,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`                                  // A unique identifier for the entity (resource) the operation is acting on, used with EntityType to ensure we have selected the right entity.
	EntityType          string               `protobuf:"bytes,6,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"`                            // Specified the type of entity the operation is acting on, used with EntityId to ensure we have selected the right Entity.
	ExpirationTimestamp *timestamp.Timestamp `protobuf:"bytes,7,opt,name=expiration_timestamp,json=expirationTimestamp,proto3" json:"expiration_timestamp,omitempty"` // Defines when the operation should expire and prevent execution, should it have passed this date.
	Body                []byte               `protobuf:"bytes,8,opt,name=body,proto3" json:"body,omitempty"`                                                          // Contains request payload or data needed for the operation in HTTP operations.
	HttpMethod          string               `protobuf:"bytes,9,opt,name=http_method,json=httpMethod,proto3" json:"http_method,omitempty"`                            // Indicated the GGPT method if the operation requires HTTP-based communication.
	Extension           *any1.Any            `protobuf:"bytes,10,opt,name=extension,proto3" json:"extension,omitempty"`                                               // An optional and flexible field to add any data the user may require.
	// contains filtered or unexported fields
}
    
        
          
            func (*OperationRequest) Descriptor
            deprecated
            
          
  
    
  
      
      func (*OperationRequest) Descriptor() ([]byte, []int)
Deprecated: Use OperationRequest.ProtoReflect.Descriptor instead.
func (*OperationRequest) GetApiVersion ¶
func (x *OperationRequest) GetApiVersion() string
func (*OperationRequest) GetBody ¶
func (x *OperationRequest) GetBody() []byte
func (*OperationRequest) GetEntityId ¶
func (x *OperationRequest) GetEntityId() string
func (*OperationRequest) GetEntityType ¶
func (x *OperationRequest) GetEntityType() string
func (*OperationRequest) GetExpirationTimestamp ¶
func (x *OperationRequest) GetExpirationTimestamp() *timestamp.Timestamp
func (*OperationRequest) GetExtension ¶
func (x *OperationRequest) GetExtension() *any1.Any
func (*OperationRequest) GetHttpMethod ¶
func (x *OperationRequest) GetHttpMethod() string
func (*OperationRequest) GetOperationId ¶
func (x *OperationRequest) GetOperationId() string
func (*OperationRequest) GetOperationName ¶
func (x *OperationRequest) GetOperationName() string
func (*OperationRequest) GetRetryCount ¶
func (x *OperationRequest) GetRetryCount() int32
func (*OperationRequest) ProtoMessage ¶
func (*OperationRequest) ProtoMessage()
func (*OperationRequest) ProtoReflect ¶
func (x *OperationRequest) ProtoReflect() protoreflect.Message
func (*OperationRequest) Reset ¶
func (x *OperationRequest) Reset()
func (*OperationRequest) String ¶
func (x *OperationRequest) String() string
 Click to show internal directories. 
   Click to hide internal directories.