Documentation ¶
Index ¶
- func New(ctx context.Context, param Param) (Controller, Param, error)
- type Config
- type Controller
- func (ctrl *Controller) CompileTemplate(text string) (*template.Template, error)
- func (ctrl *Controller) GetSlackUser(ctx context.Context, name string) (slack.User, error)
- func (ctrl *Controller) RenderTemplate(tpl *template.Template, data interface{}) (string, error)
- func (ctrl *Controller) Run(ctx context.Context, param Param) error
- type Param
- type Secret
- type SlackConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { LogLevel string `yaml:"log_level"` SecretID string `yaml:"secret_id"` SecretVersionID string `yaml:"secret_version_id"` AWSAccountID string `yaml:"aws_account_id"` Region string Message string MessageForSystemUser string `yaml:"message_for_system_user"` Slack SlackConfig InitialPasswordLength int `yaml:"initial_password_length"` WhenLoginProfileExist string `yaml:"when_login_profile_exist"` DynamoDBTableName string `yaml:"dynamodb_table_name"` DynamoDBTTL int `yaml:"dynamodb_ttl"` }
type Controller ¶
type Controller struct { Stdin io.Reader Stdout io.Writer Stderr io.Writer Config Config SlackBot *slack.Client MessageTemplate *template.Template MessageTemplateForSystemUser *template.Template }
func (*Controller) CompileTemplate ¶
func (ctrl *Controller) CompileTemplate(text string) (*template.Template, error)
func (*Controller) GetSlackUser ¶
func (*Controller) RenderTemplate ¶
func (ctrl *Controller) RenderTemplate(tpl *template.Template, data interface{}) (string, error)
type SlackConfig ¶
type SlackConfig struct {
ChannelIDForSystemUser string `yaml:"channel_id_for_system_user"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.