Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ErrNoIDInRequest is the error code indicating that no ID was specified ErrNoIDInRequest = "NoIdInRequest" // ErrInvalidIDInRequest is the error code indicating that the ID was invalid ErrInvalidIDInRequest = "InvalidIdInRequest" // ErrNoCredentialsAssociated is the error code indicating no credentials are // associated with the specified ID ErrNoCredentialsAssociated = "NoCredentialsAssociated" // ErrCredentialsUninitialized is the error code indicating that credentials were // not properly initialized. This may happen immediately after the agent is // started, before it has completed state reconciliation. ErrCredentialsUninitialized = "CredentialsUninitialized" // ErrInternalServer is the error indicating something generic went wrong ErrInternalServer = "InternalServerError" // CredentialsPath specifies the relative URI path for serving task IAM credentials CredentialsPath = credentials.V1CredentialsPath )
Variables ¶
This section is empty.
Functions ¶
func CredentialsHandler ¶
func CredentialsHandler( credentialsManager credentials.Manager, auditLogger auditinterface.AuditLogger, ) func(http.ResponseWriter, *http.Request)
CredentialsHandler creates response for the 'v1/credentials' API. It returns a JSON response containing credentials when found. The HTTP status code of 400 is returned otherwise.
func CredentialsHandlerImpl ¶
func CredentialsHandlerImpl( w http.ResponseWriter, r *http.Request, auditLogger auditinterface.AuditLogger, credentialsManager credentials.Manager, credentialsID string, errPrefix string, )
CredentialsHandlerImpl is the major logic in CredentialsHandler, abstract this out because v2.CredentialsHandler also uses the same logic.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.