Documentation ¶
Index ¶
- Constants
- func GetRequestAccessModal(tmplVals Template) (slack.ModalViewRequest, error)
- func GetRequestApprovalBlocks(auditObj internal.AuditObject, gotResponse bool, responseMSG string) ([]slack.Block, error)
- func GetValuesFromSelectedOptions(selectedOptions []slack.OptionBlockObject) []string
- type Messenger
- func (m *Messenger) GenerateModal(modalType string, Accounts, LoginRoles []string, hasResourceFinder bool, ...) (slack.ModalViewRequest, error)
- func (m *Messenger) GetUserIdsFromGroup(groups []string) ([]string, error)
- func (m *Messenger) PostBlockMessage(channelId string, msgContents []slack.Block, requestId string) (string, string, error)
- func (m *Messenger) PostSimpleMessage(channelId string, msgText string, requestId string) error
- func (m *Messenger) UpdateMessageFromMessageObj(requestId string, approvalMsgObj []internal.ApprovalMsgObj, ...) error
- type Option
- type Options
- type Template
- type Text
Constants ¶
View Source
const ( RequestDescriptionId = "accessRequest" IamServicesSelectorActionID = "awsServicesSelect" IamServiceActionSelectorActionID = "awsServiceActionSelector" IamResourcesSelectorActionID = "awsResourcesSelector" AccountSelectorActionId = "awsAccountSelector" LoginRoleSelector = "awsLoginRoleSelector" TimeInputID = "awsTimeInput" ApprovedActionID = "approve" DenyActionID = "deny" )
Slack Action and block id Constants which can be referenced else where
Variables ¶
This section is empty.
Functions ¶
func GetRequestAccessModal ¶
func GetRequestAccessModal(tmplVals Template) (slack.ModalViewRequest, error)
func GetValuesFromSelectedOptions ¶
func GetValuesFromSelectedOptions(selectedOptions []slack.OptionBlockObject) []string
Types ¶
type Messenger ¶
func NewMessenger ¶
func (*Messenger) GenerateModal ¶
func (*Messenger) GetUserIdsFromGroup ¶
func (*Messenger) PostBlockMessage ¶
func (*Messenger) PostSimpleMessage ¶
func (*Messenger) UpdateMessageFromMessageObj ¶
type Options ¶
type Options struct {
Options []Option `json:"options"`
}
Options Slack Options block for rendering dynamic select lists
func MapToOptions ¶
MapToOptions Given a map[string]string will return Options required for a multiselect and other lists Value will be shown within the Text of the option Key will be shown in the Text and as the actual value of the option e.g Key (Value)
func SliceToOptions ¶
SliceToOptions Given a slice will return Options required for a multiselect and other lists
type Template ¶
type Template struct { SelectedService string //This is here to store the selected service into the BlockID as block_suggestion doesn't show the state LoginRoles []string Accounts []string PrivateMetadata string TimeInputID string RequestDescriptionId string LoginRoleSelectorId string AccountSelectorId string ServiceActionId string ActionsActionId string ActionsBlockId string ResourcesActionId string ResourcesBlockId string IsIamService bool IsActionSelector bool IsExternalResourcesSelector bool IsResourcesText bool }
Template struct for options within Slack Model
Click to show internal directories.
Click to hide internal directories.