Documentation
¶
Index ¶
- Constants
- func Coalesce(args ...string) string
- func FillTemplateMessage(msg string, filler map[string]interface{}) (string, error)
- func ValidateEmailID(email string) error
- func ValidateUrl(u string) error
- type AssignUserGroupsCommand
- type AssignUserGroupsCommandConfig
- type Command
- type Config
- type CreateUserCommand
- type CreateUserCommandConfig
- type DeactivateUserCommand
- type DeactivateUserCommandConfig
- type ListGroupsCommand
- type ListGroupsCommandConfig
- type Metadata
- type OktaGroups
- type ResetUserMultifactorsCommand
- type ResetUserMultifactorsCommandConfig
- type ResetUserPasswordCommand
- type ResetUserPasswordCommandConfig
Constants ¶
const ParamListSep = ","
ParamListSep is the string separating individual values in a raw string representing a list of parameter values.
Variables ¶
This section is empty.
Functions ¶
func Coalesce ¶
Coalesce returns the first non-empty string it encounters amongst the arguments supplied to the function.
func FillTemplateMessage ¶
FillTemplateMessage interpolates data into a complex string and makes it more polished. It abstracts away the nuances of templating from the user.
func ValidateEmailID ¶
ValidateEmailID returns an error if the parameter supplied to it is not a valid Email ID.
func ValidateUrl ¶
ValidateUrl returns an error if the parameter supplied to it is not a valid URL. Because this function is only a wrapper around a standard library function, it doesn't need to be tested.
Types ¶
type AssignUserGroupsCommand ¶
type AssignUserGroupsCommand struct {
*Command
}
func (*AssignUserGroupsCommand) Help ¶
func (c *AssignUserGroupsCommand) Help() string
func (*AssignUserGroupsCommand) ParseArgs ¶
func (c *AssignUserGroupsCommand) ParseArgs(args []string) (*AssignUserGroupsCommandConfig, error)
func (*AssignUserGroupsCommand) Run ¶
func (c *AssignUserGroupsCommand) Run(args []string) int
func (*AssignUserGroupsCommand) Synopsis ¶
func (c *AssignUserGroupsCommand) Synopsis() string
type Command ¶
Command contains objects passed to all CLI commands
func (*Command) OktaClient ¶
OktaClient returns an instance of Okta Client initialized with organization-specific API credentials. This method only creates the client the first time it is called. Subsequent calls return the cached client. This method should only be called after api credentials have been populated in the metadata.
type Config ¶
type Config struct {
OrgUrl, ApiToken string
}
Config contains cli options that are made available to all commands. It is used to pass down global configuration.
type CreateUserCommand ¶
type CreateUserCommand struct {
*Command
}
func (*CreateUserCommand) Help ¶
func (c *CreateUserCommand) Help() string
func (*CreateUserCommand) ParseArgs ¶
func (c *CreateUserCommand) ParseArgs(args []string) (*CreateUserCommandConfig, error)
func (*CreateUserCommand) Run ¶
func (c *CreateUserCommand) Run(args []string) int
func (*CreateUserCommand) Synopsis ¶
func (c *CreateUserCommand) Synopsis() string
type CreateUserCommandConfig ¶
type DeactivateUserCommand ¶
type DeactivateUserCommand struct {
*Command
}
func (*DeactivateUserCommand) Help ¶
func (c *DeactivateUserCommand) Help() string
func (*DeactivateUserCommand) ParseArgs ¶
func (c *DeactivateUserCommand) ParseArgs(args []string) (*DeactivateUserCommandConfig, error)
func (*DeactivateUserCommand) Run ¶
func (c *DeactivateUserCommand) Run(args []string) int
func (*DeactivateUserCommand) Synopsis ¶
func (c *DeactivateUserCommand) Synopsis() string
type DeactivateUserCommandConfig ¶
type DeactivateUserCommandConfig struct {
EmailID string
}
type ListGroupsCommand ¶
type ListGroupsCommand struct {
*Command
}
func (*ListGroupsCommand) Help ¶
func (c *ListGroupsCommand) Help() string
func (*ListGroupsCommand) ParseArgs ¶
func (c *ListGroupsCommand) ParseArgs(args []string) (*ListGroupsCommandConfig, error)
func (*ListGroupsCommand) Run ¶
func (c *ListGroupsCommand) Run(args []string) int
func (*ListGroupsCommand) Synopsis ¶
func (c *ListGroupsCommand) Synopsis() string
type ListGroupsCommandConfig ¶
type OktaGroups ¶
func (OktaGroups) GetID ¶
func (groups OktaGroups) GetID(name string) string
GetID returns the ID of the Group whose name is specified. If the Group with that name doesn't exist, this method simply returns an empty string.
type ResetUserMultifactorsCommand ¶
type ResetUserMultifactorsCommand struct {
*Command
}
func (*ResetUserMultifactorsCommand) Help ¶
func (c *ResetUserMultifactorsCommand) Help() string
func (*ResetUserMultifactorsCommand) ParseArgs ¶
func (c *ResetUserMultifactorsCommand) ParseArgs(args []string) (*ResetUserMultifactorsCommandConfig, error)
func (*ResetUserMultifactorsCommand) Run ¶
func (c *ResetUserMultifactorsCommand) Run(args []string) int
func (*ResetUserMultifactorsCommand) Synopsis ¶
func (c *ResetUserMultifactorsCommand) Synopsis() string
type ResetUserMultifactorsCommandConfig ¶
type ResetUserMultifactorsCommandConfig struct {
EmailID string
}
type ResetUserPasswordCommand ¶
type ResetUserPasswordCommand struct {
*Command
}
func (*ResetUserPasswordCommand) Help ¶
func (c *ResetUserPasswordCommand) Help() string
func (*ResetUserPasswordCommand) ParseArgs ¶
func (c *ResetUserPasswordCommand) ParseArgs(args []string) (*ResetUserPasswordCommandConfig, error)
func (*ResetUserPasswordCommand) Run ¶
func (c *ResetUserPasswordCommand) Run(args []string) int
func (*ResetUserPasswordCommand) Synopsis ¶
func (c *ResetUserPasswordCommand) Synopsis() string
type ResetUserPasswordCommandConfig ¶
type ResetUserPasswordCommandConfig struct {
EmailID string
}