Documentation ¶
Index ¶
- type Comms
- type CommsCredentials
- type CommsPackage
- type CommsStorage
- type CommsSystem
- type Communication
- func (c Communication) AttachCommsHandler(w http.ResponseWriter, r *http.Request)
- func (c Communication) CreateCommsHandler(w http.ResponseWriter, r *http.Request)
- func (c Communication) DeleteCommsHandler(w http.ResponseWriter, r *http.Request)
- func (c Communication) DetachCommsHandler(w http.ResponseWriter, r *http.Request)
- func (c Communication) ListCommsHandler(w http.ResponseWriter, r *http.Request)
- type Credentials
- type Discord
- type DiscordCredentials
- type Slack
- type SlackCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comms ¶
func (Comms) CommsSend ¶
func (c Comms) CommsSend(system CommsSystem, creds CommsCredentials, commsPackage CommsPackage) error
func (Comms) SendComms ¶
func (c Comms) SendComms(commsPackage CommsPackage) error
type CommsCredentials ¶ added in v0.8.0
type CommsPackage ¶
type CommsStorage ¶ added in v0.8.0
func NewCommsStorage ¶ added in v0.8.0
func NewCommsStorage(c config.Config) *CommsStorage
func (CommsStorage) FetchCredentials ¶ added in v0.8.0
func (c CommsStorage) FetchCredentials(a agent.Agent) (CommsCredentials, error)
type CommsSystem ¶
type CommsSystem interface { Connect() error ParseCredentials(interface{}) error Send(cp CommsPackage) error }
type Communication ¶
func NewCommunication ¶
func NewCommunication(config config.Config) *Communication
func (Communication) AttachCommsHandler ¶
func (c Communication) AttachCommsHandler(w http.ResponseWriter, r *http.Request)
func (Communication) CreateCommsHandler ¶
func (c Communication) CreateCommsHandler(w http.ResponseWriter, r *http.Request)
func (Communication) DeleteCommsHandler ¶
func (c Communication) DeleteCommsHandler(w http.ResponseWriter, r *http.Request)
func (Communication) DetachCommsHandler ¶
func (c Communication) DetachCommsHandler(w http.ResponseWriter, r *http.Request)
func (Communication) ListCommsHandler ¶
func (c Communication) ListCommsHandler(w http.ResponseWriter, r *http.Request)
type Credentials ¶
type Credentials struct {
AgentID string `json:"agent_id"`
}
type Discord ¶
type Discord struct { BotAuth string Context context.Context Credentials DiscordCredentials Config config.Config }
func NewDiscord ¶
func (*Discord) ParseCredentials ¶
func (*Discord) Send ¶
func (d *Discord) Send(commsPackage CommsPackage) error
type DiscordCredentials ¶
type DiscordCredentials struct { Channel string `json:"channel"` Credentials }
type Slack ¶ added in v0.5.0
type Slack struct { Client *slack.Client Context context.Context Credentials SlackCredentials Config config.Config }
func (*Slack) ParseCredentials ¶ added in v0.5.0
func (*Slack) Send ¶ added in v0.5.0
func (s *Slack) Send(commsPackage CommsPackage) error
type SlackCredentials ¶ added in v0.5.0
type SlackCredentials struct { Channel string `json:"channel"` Token string `json:"token"` Credentials }
Click to show internal directories.
Click to hide internal directories.