Documentation
¶
Overview ¶
Package functions is a generated protocol buffer package.
It is generated from these files:
github.com/appcelerator/amp/data/functions/functions.proto
It has these top-level messages:
Function FunctionCall FunctionReturn
Index ¶
- Constants
- func CheckImage(image string) (string, error)
- func CheckName(name string) (string, error)
- type Error
- type Function
- func (*Function) Descriptor() ([]byte, []int)
- func (m *Function) GetCreateDt() int64
- func (m *Function) GetId() string
- func (m *Function) GetImage() string
- func (m *Function) GetName() string
- func (m *Function) GetOwner() *accounts.Account
- func (*Function) ProtoMessage()
- func (m *Function) Reset()
- func (m *Function) String() string
- func (f *Function) Validate() (err error)
- type FunctionCall
- func (*FunctionCall) Descriptor() ([]byte, []int)
- func (m *FunctionCall) GetCallID() string
- func (m *FunctionCall) GetFunction() *Function
- func (m *FunctionCall) GetInput() []byte
- func (m *FunctionCall) GetReturnTo() string
- func (*FunctionCall) ProtoMessage()
- func (m *FunctionCall) Reset()
- func (m *FunctionCall) String() string
- type FunctionReturn
- type Interface
- type Store
- func (s *Store) CreateFunction(ctx context.Context, name string, image string) (function *Function, err error)
- func (s *Store) DeleteFunction(ctx context.Context, id string) error
- func (s *Store) GetFunction(ctx context.Context, id string) (*Function, error)
- func (s *Store) GetFunctionByName(ctx context.Context, name string) (function *Function, err error)
- func (s *Store) ListFunctions(ctx context.Context) ([]*Function, error)
- func (s *Store) Reset(ctx context.Context)
Constants ¶
View Source
const ( InvalidName = Error("name is invalid") InvalidImage = Error("image is invalid") FunctionAlreadyExists = Error("function already exists") FunctionNotFound = Error("function not found") )
Errors
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Function ¶
type Function struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Image string `protobuf:"bytes,3,opt,name=image" json:"image,omitempty"`
Owner *accounts.Account `protobuf:"bytes,4,opt,name=owner" json:"owner,omitempty"`
CreateDt int64 `protobuf:"varint,5,opt,name=create_dt,json=createDt" json:"create_dt,omitempty"`
}
func (*Function) Descriptor ¶
func (*Function) GetCreateDt ¶
func (*Function) ProtoMessage ¶
func (*Function) ProtoMessage()
type FunctionCall ¶
type FunctionCall struct {
CallID string `protobuf:"bytes,1,opt,name=callID" json:"callID,omitempty"`
Input []byte `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"`
Function *Function `protobuf:"bytes,3,opt,name=function" json:"function,omitempty"`
ReturnTo string `protobuf:"bytes,4,opt,name=returnTo" json:"returnTo,omitempty"`
}
func (*FunctionCall) Descriptor ¶
func (*FunctionCall) Descriptor() ([]byte, []int)
func (*FunctionCall) GetCallID ¶
func (m *FunctionCall) GetCallID() string
func (*FunctionCall) GetFunction ¶
func (m *FunctionCall) GetFunction() *Function
func (*FunctionCall) GetInput ¶
func (m *FunctionCall) GetInput() []byte
func (*FunctionCall) GetReturnTo ¶
func (m *FunctionCall) GetReturnTo() string
func (*FunctionCall) ProtoMessage ¶
func (*FunctionCall) ProtoMessage()
func (*FunctionCall) Reset ¶
func (m *FunctionCall) Reset()
func (*FunctionCall) String ¶
func (m *FunctionCall) String() string
type FunctionReturn ¶
type FunctionReturn struct {
CallID string `protobuf:"bytes,1,opt,name=callID" json:"callID,omitempty"`
Output []byte `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
}
func (*FunctionReturn) Descriptor ¶
func (*FunctionReturn) Descriptor() ([]byte, []int)
func (*FunctionReturn) GetCallID ¶
func (m *FunctionReturn) GetCallID() string
func (*FunctionReturn) GetOutput ¶
func (m *FunctionReturn) GetOutput() []byte
func (*FunctionReturn) ProtoMessage ¶
func (*FunctionReturn) ProtoMessage()
func (*FunctionReturn) Reset ¶
func (m *FunctionReturn) Reset()
func (*FunctionReturn) String ¶
func (m *FunctionReturn) String() string
type Interface ¶
type Interface interface {
// CreateFunction creates a new function
CreateFunction(ctx context.Context, name string, image string) (function *Function, err error)
// GetFunction fetches a function by id
GetFunction(ctx context.Context, id string) (function *Function, err error)
// GetFunctionByName fetches a function by name
GetFunctionByName(ctx context.Context, name string) (function *Function, err error)
// ListFunctions lists functions
ListFunctions(ctx context.Context) (functions []*Function, err error)
// DeleteFunction deletes a function by id
DeleteFunction(ctx context.Context, id string) (err error)
// Reset resets the function store
Reset(ctx context.Context)
}
Interface defines the function data access layer
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements function data.Interface
func (*Store) CreateFunction ¶
func (s *Store) CreateFunction(ctx context.Context, name string, image string) (function *Function, err error)
CreateFunction creates a new function
func (*Store) DeleteFunction ¶
DeleteFunction deletes a function by id
func (*Store) GetFunction ¶
GetFunction fetches a function by id
func (*Store) GetFunctionByName ¶
GetFunctionByName fetches a function by name
func (*Store) ListFunctions ¶
ListFunctions lists functions
Click to show internal directories.
Click to hide internal directories.