Documentation ¶
Index ¶
- type CORSKey
- type EventTypeKey
- type FunctionKey
- type Service
- func (service Service) CreateCORS(config *cors.CORS) (*cors.CORS, error)
- func (service Service) CreateEventType(eventType *event.Type) (*event.Type, error)
- func (service Service) CreateFunction(fn *function.Function) (*function.Function, error)
- func (service Service) CreateSubscription(sub *subscription.Subscription) (*subscription.Subscription, error)
- func (service Service) DeleteCORS(space string, id cors.ID) error
- func (service Service) DeleteEventType(space string, name event.TypeName) error
- func (service Service) DeleteFunction(space string, id function.ID) error
- func (service Service) DeleteSubscription(space string, id subscription.ID) error
- func (service Service) GetCORS(space string, id cors.ID) (*cors.CORS, error)
- func (service Service) GetEventType(space string, name event.TypeName) (*event.Type, error)
- func (service Service) GetFunction(space string, id function.ID) (*function.Function, error)
- func (service Service) GetSubscription(space string, id subscription.ID) (*subscription.Subscription, error)
- func (service Service) ListCORS(space string, filters ...metadata.Filter) (cors.CORSes, error)
- func (service Service) ListEventTypes(space string, filters ...metadata.Filter) (event.Types, error)
- func (service Service) ListFunctions(space string, filters ...metadata.Filter) (function.Functions, error)
- func (service Service) ListSubscriptions(space string, filters ...metadata.Filter) (subscription.Subscriptions, error)
- func (service Service) UpdateCORS(config *cors.CORS) (*cors.CORS, error)
- func (service Service) UpdateEventType(newEventType *event.Type) (*event.Type, error)
- func (service Service) UpdateFunction(fn *function.Function) (*function.Function, error)
- func (service Service) UpdateSubscription(id subscription.ID, newSub *subscription.Subscription) (*subscription.Subscription, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventTypeKey ¶
EventTypeKey is a key under which event type data is stored KV store.
func (EventTypeKey) String ¶
func (key EventTypeKey) String() string
type FunctionKey ¶
FunctionKey is a key under which function data is stored KV store.
func (FunctionKey) String ¶
func (key FunctionKey) String() string
type Service ¶
type Service struct { EventTypeStore store.Store FunctionStore store.Store SubscriptionStore store.Store CORSStore store.Store Log *zap.Logger }
Service implements function.Service and subscription.Service using libkv as a backend.
func (Service) CreateCORS ¶
CreateCORS creates CORS configuration.
func (Service) CreateEventType ¶
CreateEventType creates event type in configuration.
func (Service) CreateFunction ¶
CreateFunction registers function in configuration.
func (Service) CreateSubscription ¶
func (service Service) CreateSubscription(sub *subscription.Subscription) (*subscription.Subscription, error)
CreateSubscription creates subscription.
func (Service) DeleteCORS ¶
DeleteCORS deletes CORS config from the configuration.
func (Service) DeleteEventType ¶
DeleteEventType deletes event type from the configuration.
func (Service) DeleteFunction ¶
DeleteFunction deletes function from the registry.
func (Service) DeleteSubscription ¶
func (service Service) DeleteSubscription(space string, id subscription.ID) error
DeleteSubscription deletes subscription.
func (Service) GetEventType ¶
GetEventType returns function from configuration.
func (Service) GetFunction ¶
GetFunction returns function from configuration.
func (Service) GetSubscription ¶
func (service Service) GetSubscription(space string, id subscription.ID) (*subscription.Subscription, error)
GetSubscription return single subscription.
func (Service) ListEventTypes ¶
func (service Service) ListEventTypes(space string, filters ...metadata.Filter) (event.Types, error)
ListEventTypes returns an array of all event types in the space.
func (Service) ListFunctions ¶
func (service Service) ListFunctions(space string, filters ...metadata.Filter) (function.Functions, error)
ListFunctions returns an array of all functions in the space.
func (Service) ListSubscriptions ¶
func (service Service) ListSubscriptions(space string, filters ...metadata.Filter) (subscription.Subscriptions, error)
ListSubscriptions returns array of all Subscription.
func (Service) UpdateCORS ¶
UpdateCORS updates CORS configuration.
func (Service) UpdateEventType ¶
UpdateEventType updates subscription.
func (Service) UpdateFunction ¶
UpdateFunction updates function configuration.
func (Service) UpdateSubscription ¶
func (service Service) UpdateSubscription(id subscription.ID, newSub *subscription.Subscription) (*subscription.Subscription, error)
UpdateSubscription updates subscription.