Documentation
¶
Index ¶
- Constants
- func SetLogger(l *logrus.Logger)
- type Client
- func (c *Client) Delete(profile string) error
- func (c *Client) GetProfile() (string, error)
- func (c *Client) ListProfiles() ([]ListProfilesResponse, error)
- func (c *Client) LoadUrl(profile string) string
- func (c *Client) ProfileUrl() string
- func (c *Client) SubmitCreds(creds *storage.RoleCredentials, profile string, slotted bool) error
- type ClientRequest
- type EcsServer
- func (e *EcsServer) AuthToken() string
- func (e *EcsServer) BaseURL() string
- func (e *EcsServer) CredsRoute(w http.ResponseWriter, r *http.Request)
- func (e *EcsServer) DefaultRoute(w http.ResponseWriter, r *http.Request)
- func (e *EcsServer) Expired(w http.ResponseWriter)
- func (e *EcsServer) Invalid(w http.ResponseWriter)
- func (e *EcsServer) OK(w http.ResponseWriter)
- func (e *EcsServer) ProfileRoute(w http.ResponseWriter, r *http.Request)
- func (e *EcsServer) Serve() error
- func (e *EcsServer) Unavailable(w http.ResponseWriter)
- type ListProfilesResponse
- type Message
Constants ¶
View Source
const ( CREDS_ROUTE = "/creds" // put/get/delete PROFILE_ROUTE = "/profile" // get DEFAULT_ROUTE = "/" // get: default route CHARSET_JSON = "application/json; charset=utf-8" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetProfile ¶
func (*Client) ListProfiles ¶ added in v1.13.0
func (c *Client) ListProfiles() ([]ListProfilesResponse, error)
ListProfiles returns a list of profiles that are loaded into slots
func (*Client) ProfileUrl ¶
func (*Client) SubmitCreds ¶
type ClientRequest ¶
type ClientRequest struct {
Creds *storage.RoleCredentials `json:"Creds"`
ProfileName string `json:"ProfileName"`
}
type EcsServer ¶
type EcsServer struct {
// contains filtered or unexported fields
}
func NewEcsServer ¶
NewEcsServer creates a new ECS Server
func (*EcsServer) CredsRoute ¶
func (e *EcsServer) CredsRoute(w http.ResponseWriter, r *http.Request)
CredsRoutef accepts GET, PUT, DELETE to manage our creds. The path compoent after the first word indicates a named slot. Lack of a named slot utilizes the defaultCreds
func (*EcsServer) DefaultRoute ¶ added in v1.13.0
func (e *EcsServer) DefaultRoute(w http.ResponseWriter, r *http.Request)
func (*EcsServer) Expired ¶
func (e *EcsServer) Expired(w http.ResponseWriter)
Expired returns a credentials expired response
func (*EcsServer) Invalid ¶
func (e *EcsServer) Invalid(w http.ResponseWriter)
Invalid returns an invalid request response
func (*EcsServer) ProfileRoute ¶
func (e *EcsServer) ProfileRoute(w http.ResponseWriter, r *http.Request)
RoleRoute returns the current ProfileName in the defaultCreds
func (*EcsServer) Unavailable ¶
func (e *EcsServer) Unavailable(w http.ResponseWriter)
Unavailable returns a credentials unavailable response
type ListProfilesResponse ¶ added in v1.13.0
type ListProfilesResponse struct {
ProfileName string `json:"ProfileName" header:"ProfileName"`
AccountIdPad string `json:"AccountId" header:"AccountIdPad"`
RoleName string `json:"RoleName" header:"RoleName"`
Expiration int64 `json:"Expiration" header:"Expiration"`
Expires string `json:"Expires" header:"Expires"`
}
type Message ¶ added in v1.13.0
Use format as defined here: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds
Click to show internal directories.
Click to hide internal directories.