Documentation ¶
Index ¶
- func RegisterEventService(name string, event *EventService) error
- func RegisterStatusService(name string, statusService *StatusService) error
- type BusyBee
- func (bb *BusyBee) CreateEventService(name string, conf interface{}) (InEventer, error)
- func (bb *BusyBee) CreateKeys(priv string) error
- func (bb *BusyBee) CreateStatusService(name string, conf interface{}) (UpdateStatuser, error)
- func (bb *BusyBee) Decrypt(encMsg, label string) (string, error)
- func (bb *BusyBee) Encrypt(msg, label string) (string, error)
- func (bb *BusyBee) KeyValid() (bool, error)
- func (bb *BusyBee) ListEventService() []string
- func (bb *BusyBee) ListStatusService() []string
- func (bb *BusyBee) NewUser(eventService InEventer, statusService UpdateStatuser) *User
- type ConfigCreator
- type EventService
- type EventServiceCreator
- type InEventer
- type PluginConfig
- type Service
- type ServiceType
- type Status
- type StatusService
- type StatusServiceCreator
- type UpdateStatuser
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterEventService ¶ added in v0.1.2
func RegisterEventService(name string, event *EventService) error
RegisterEventService registers an EventService instance with BusyBee.
func RegisterStatusService ¶
func RegisterStatusService(name string, statusService *StatusService) error
RegisterStatusService registers a StatusService instance with BusyBee
Types ¶
type BusyBee ¶ added in v0.2.0
type BusyBee struct { EventUID string `quest:"What is the unique identifier for the Event Service?"` StatusUID string `quest:"What is the unique identifier for the Status Service?"` PrivateKey string Plugins map[string]PluginConfig }
BusyBee are configuration values that are not dependent on the the plugins installed.
func (*BusyBee) CreateEventService ¶ added in v0.2.0
CreateEventService returns an instance of a registered EventService by name.
func (*BusyBee) CreateKeys ¶ added in v0.2.0
CreateKeys will create a public/private key pair and write them to the files specified. It will also update busybee to use the new key value pairs.
func (*BusyBee) CreateStatusService ¶ added in v0.2.0
func (bb *BusyBee) CreateStatusService(name string, conf interface{}) (UpdateStatuser, error)
CreateStatusService returns an instance of a registered StatusService by name.
func (*BusyBee) Decrypt ¶ added in v0.2.0
Decrypt will decrypt the string and return the unencrypted string using the private key specified by busybee. It expects the encMsg to be in base64 encoding. label must match the label specified during encoding
func (*BusyBee) Encrypt ¶ added in v0.2.0
Encrypt will encrypt the string and return an encrypted string using the public key specified by busybee. msg is the message to encrypt. label is what the message is to encrypt (can be blank). It is base64 encoded so that it can be saved safely to a file.
func (*BusyBee) KeyValid ¶ added in v0.2.0
KeyValid checks to make sure that the private key has not been tampered with.
func (*BusyBee) ListEventService ¶ added in v0.2.0
ListEventService returns a slice of all registered event services.
func (*BusyBee) ListStatusService ¶ added in v0.2.0
ListStatusService returns a slice of all registered status services.
type ConfigCreator ¶ added in v0.1.2
type ConfigCreator func() interface{}
ConfigCreator is a function that should return a pointer to an empty configuration for that service.
type EventService ¶ added in v0.1.2
type EventService struct { Service Create EventServiceCreator }
EventService is the foundation of a service that can retrieve whether someone is in an event or not.
func GetEventService ¶ added in v0.1.2
func GetEventService(name string) (*EventService, error)
GetEventService will return the struct on how to create a new instance and a new config for that service.
type EventServiceCreator ¶ added in v0.1.2
EventServiceCreator is a function that will create a new instance of an InEventer.
type PluginConfig ¶ added in v0.2.0
type PluginConfig struct { Type ServiceType Config interface{} }
PluginConfig is the structure of a Plugin for configuration
type Service ¶ added in v0.2.0
type Service struct {
CreateConfig ConfigCreator
}
Service is used for any services that can be registered to busybee
type ServiceType ¶ added in v0.2.0
type ServiceType int
ServiceType are the different types of services BusyBee supports.
const ( //ServiceTypeEvent is for event services. ServiceTypeEvent ServiceType = iota //ServiceTypeStatus is for status services. ServiceTypeStatus )
type StatusService ¶
type StatusService struct { Service Create StatusServiceCreator }
StatusService is the foundation for any service that can update the status of a user.
func GetStatusService ¶ added in v0.1.2
func GetStatusService(name string) (*StatusService, error)
GetStatusService will return the struct on how to create a new instance and a new config for that service.
type StatusServiceCreator ¶ added in v0.1.2
type StatusServiceCreator func(interface{}, *BusyBee) (UpdateStatuser, error)
StatusServiceCreator is a function that will create a new instance of a UpdateStatuser.
type UpdateStatuser ¶ added in v0.1.2
UpdateStatuser is any service that can be used to update your status.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package exchange is used as a CalendarService in BusyBee.
|
Package exchange is used as a CalendarService in BusyBee. |
Package hipchat is used for implementing a StatusService in BusyBee.
|
Package hipchat is used for implementing a StatusService in BusyBee. |