Documentation ¶
Index ¶
- func GetProfileName(u *url.URL) string
- func SetLogger(l *logrus.Logger)
- func WithAuthorizationCheck(authToken string, next http.HandlerFunc) http.HandlerFunc
- type DefaultHandler
- type EcsServer
- func (e *EcsServer) AuthToken() string
- func (e *EcsServer) BaseURL() string
- func (e *EcsServer) DeleteSlottedCreds(profile string) error
- func (e *EcsServer) GetSlottedCreds(profile string) (*ecs.ECSClientRequest, error)
- func (e *EcsServer) ListSlottedCreds() []ecs.ListProfilesResponse
- func (e *EcsServer) PutSlottedCreds(creds *ecs.ECSClientRequest) error
- func (e *EcsServer) Serve() error
- type ExpiredCredentials
- type ProfileHandler
- type SlottedHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProfileName ¶
GetProfileName returns the name of the profile as defined as /slot/XXXX
func WithAuthorizationCheck ¶
func WithAuthorizationCheck(authToken string, next http.HandlerFunc) http.HandlerFunc
WithAuthorizationCheck checks our authToken (if set) and returns 404 on error
Types ¶
type DefaultHandler ¶
type DefaultHandler struct {
// contains filtered or unexported fields
}
func (DefaultHandler) Delete ¶
func (p DefaultHandler) Delete(w http.ResponseWriter, r *http.Request)
func (DefaultHandler) Get ¶
func (p DefaultHandler) Get(w http.ResponseWriter, r *http.Request)
func (DefaultHandler) Put ¶
func (p DefaultHandler) Put(w http.ResponseWriter, r *http.Request)
func (DefaultHandler) ServeHTTP ¶
func (p DefaultHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type EcsServer ¶
type EcsServer struct { DefaultCreds *ecs.ECSClientRequest // contains filtered or unexported fields }
func NewEcsServer ¶
NewEcsServer creates a new ECS Server
func (*EcsServer) DeleteSlottedCreds ¶
deleteCreds removes our slotted credentials from the cache
func (*EcsServer) GetSlottedCreds ¶
func (e *EcsServer) GetSlottedCreds(profile string) (*ecs.ECSClientRequest, error)
getCreds fetches the named profile from the cache.
func (*EcsServer) ListSlottedCreds ¶
func (e *EcsServer) ListSlottedCreds() []ecs.ListProfilesResponse
ListSlottedCreds returns the list of roles in our slots
func (*EcsServer) PutSlottedCreds ¶
func (e *EcsServer) PutSlottedCreds(creds *ecs.ECSClientRequest) error
putCreds loads credentials into the cache
type ExpiredCredentials ¶
type ExpiredCredentials struct{}
func (*ExpiredCredentials) Error ¶
func (e *ExpiredCredentials) Error() string
type ProfileHandler ¶
type ProfileHandler struct {
// contains filtered or unexported fields
}
func (ProfileHandler) Get ¶
func (p ProfileHandler) Get(w http.ResponseWriter, r *http.Request)
func (ProfileHandler) ServeHTTP ¶
func (p ProfileHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type SlottedHandler ¶
type SlottedHandler struct {
// contains filtered or unexported fields
}
func (*SlottedHandler) Delete ¶
func (p *SlottedHandler) Delete(w http.ResponseWriter, r *http.Request)
func (*SlottedHandler) Get ¶
func (p *SlottedHandler) Get(w http.ResponseWriter, r *http.Request)
func (*SlottedHandler) Put ¶
func (p *SlottedHandler) Put(w http.ResponseWriter, r *http.Request)
func (SlottedHandler) ServeHTTP ¶
func (p SlottedHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.