Documentation ¶
Index ¶
Constants ¶
View Source
const ( IAMProviderShield = "shield" IAMProviderHTTP = "http" )
Variables ¶
View Source
var ( // ErrEmptyUserEmailParam is the error value when the passed user email is empty ErrEmptyUserEmailParam = errors.New("user email param is required") // ErrEmptyApprovers is the error value when the returned approver emails are zero/empty ErrEmptyApprovers = errors.New("got zero approver") )
Functions ¶
func NewShieldClient ¶
func NewShieldClient(config *ShieldClientConfig) (*shieldClient, error)
Types ¶
type ClientConfig ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient wraps the http client for external approver resolver service
func NewHTTPClient ¶
func NewHTTPClient(config *HTTPClientConfig) (*HTTPClient, error)
NewHTTPClient returns *iam.Client
func (*HTTPClient) GetManagerEmails ¶ added in v0.2.0
func (c *HTTPClient) GetManagerEmails(user string) ([]string, error)
GetManagerEmails fetches to external approver resolver service and returns approver emails
type HTTPClientConfig ¶
type HTTPClientConfig struct { GetManagersURL string `validate:"required,url" mapstructure:"get_managers_url"` HTTPClient *http.Client }
HTTPClientConfig is the configuration required by iam.Client
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles business logic for identity manager
type ShieldClientConfig ¶
type ShieldClientConfig struct {
Host string `validate:"required,url" mapstructure:"host"`
}
Click to show internal directories.
Click to hide internal directories.