Documentation ¶
Index ¶
- Constants
- func CmdRan(err error) bool
- func Exec(dir string, cmd string, args ...string) (ran bool, err error)
- func ExitStatus(err error) int
- type Asset
- type AssetType
- type CDKConfig
- type CDKContext
- type Command
- type Config
- type ConfigMethod
- type Handler
- type Method
- func (m *Method) BuildPath() string
- func (m *Method) Imports() []string
- func (m *Method) Inputs() []reflect.Type
- func (m *Method) Key() string
- func (m *Method) Name() string
- func (m *Method) Outputs() []reflect.Type
- func (m *Method) Package() string
- func (m *Method) PackageName() string
- func (m *Method) S3Key() string
- func (m *Method) SetBuildPath(path string)
- func (m *Method) SetS3Key(key string)
- func (m *Method) String() string
- type Mutation
- func (m *Mutation) Add(method reflect.Method) error
- func (m *Mutation) BuildPath() string
- func (m Mutation) EventNames() []string
- func (m Mutation) EventTypes() []reflect.Type
- func (m Mutation) Events() []string
- func (m Mutation) Imports() []string
- func (m Mutation) Key() string
- func (m Mutation) Name() string
- func (m Mutation) Package() string
- func (m Mutation) PackageName() string
- func (m *Mutation) S3Key() string
- func (m *Mutation) SetBuildPath(path string)
- func (m *Mutation) SetS3Key(key string)
- func (m *Mutation) Type() AssetType
- type Query
- type Service
- func (svc *Service) AddCommands(input interface{})
- func (svc *Service) AddFunction(handler Handler) error
- func (svc *Service) AddMutation(input interface{}) error
- func (svc *Service) AddQueries(input interface{})
- func (svc *Service) Build() error
- func (svc *Service) Clean() error
- func (svc *Service) Config() *Config
- func (svc *Service) Deploy() error
- func (svc *Service) Initialize() error
- func (svc *Service) Publish() error
- func (svc *Service) String() string
- func (svc *Service) Write(name string) error
- type Uploader
Constants ¶
View Source
const ( CommandType = AssetType("Command") QueryType = AssetType("Query") MutationType = AssetType("Mutation") FunctionType = AssetType("Function") )
Variables ¶
This section is empty.
Functions ¶
func ExitStatus ¶
ExitStatus returns the exit status of the error if it is an exec.ExitError or if it implements ExitStatus() int. 0 if it is nil or 1 if it is a different error.
Types ¶
type CDKConfig ¶
type CDKConfig struct { App string `json:"app"` Context CDKContext `json:"context"` }
type CDKContext ¶
type Config ¶
type Config struct { ServiceName string `json:"service"` Bucket string `json:"bucket"` Events []string `json:"events,omitempty"` Commands []ConfigMethod `json:"commands,omitempty"` Queries []ConfigMethod `json:"queries,omitempty"` Mutation *ConfigMethod `json:"mutations,omitempty"` Functions []ConfigMethod `json:"functions,omitempty"` }
Config - TODO: some meta about commit version
type ConfigMethod ¶
type Method ¶
type Method struct { ServiceType reflect.Type Method reflect.Method Event reflect.Type // contains filtered or unexported fields }
func (*Method) PackageName ¶
func (*Method) SetBuildPath ¶
type Mutation ¶
type Mutation struct { ServiceType reflect.Type Methods []*Method // contains filtered or unexported fields }
func (Mutation) EventNames ¶
func (Mutation) EventTypes ¶
func (Mutation) PackageName ¶
func (*Mutation) SetBuildPath ¶
type Service ¶
type Service struct { Commands []*Command Mutation *Mutation Queries []*Query // contains filtered or unexported fields }
func (*Service) AddFunction ¶
AddFunction - trigger should be plain method which is called in lambda.Start()
func (*Service) AddMutation ¶
AddMutation - TODO: mutation has following structure: OnEvent(context, Event) error
func (*Service) Initialize ¶
Click to show internal directories.
Click to hide internal directories.