Documentation ¶
Overview ¶
Package lister provides the endpoint to retrieve multiple credentials
Index ¶
- Constants
- func IsInvalidConfig(err error) bool
- type Config
- type Endpoint
- func (e *Endpoint) Decoder() kithttp.DecodeRequestFunc
- func (e *Endpoint) Encoder() kithttp.EncodeResponseFunc
- func (e *Endpoint) Endpoint() kitendpoint.Endpoint
- func (e *Endpoint) Method() string
- func (e *Endpoint) Middlewares() []kitendpoint.Middleware
- func (e *Endpoint) Name() string
- func (e *Endpoint) Path() string
- type Request
- type Response
- type ResponseAWS
- type ResponseAWSRoles
- type ResponseAzure
- type ResponseAzureCredential
Constants ¶
const ( // Method is the HTTP method to act on. Method = "GET" // Name is the name of our endpoint. Name = "lister" // Path is the URI path our endpoint listens to. Path = "/v4/organizations/{organization}/credentials/" )
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type Config ¶
type Config struct { Logger micrologger.Logger Middleware *middleware.Middleware // nolint: structcheck, unused Service *lister.Service }
Config defines which configuration our endpoint expects.
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint is the actual endpoint data structure.
func (*Endpoint) Decoder ¶
func (e *Endpoint) Decoder() kithttp.DecodeRequestFunc
Decoder gets all useful information from a request to the endpoint.
func (*Endpoint) Encoder ¶
func (e *Endpoint) Encoder() kithttp.EncodeResponseFunc
Encoder creates a response in the specified format.
func (*Endpoint) Endpoint ¶
func (e *Endpoint) Endpoint() kitendpoint.Endpoint
Endpoint is where requests are handled and responses are returned.
func (*Endpoint) Middlewares ¶
func (e *Endpoint) Middlewares() []kitendpoint.Middleware
Middlewares returns the middlewares used by this endpoint.
type Request ¶
type Request struct {
Organization string
}
Request is the request the lister service expects.
type Response ¶
type Response struct { ID string `json:"id"` Provider string `json:"provider"` AWS *ResponseAWS `json:"aws,omitempty"` Azure *ResponseAzure `json:"azure,omitempty"` }
Response is the response format our endpoint will return.
type ResponseAWS ¶
type ResponseAWS struct {
Roles *ResponseAWSRoles `json:"roles"`
}
ResponseAWS is a type used by above Response.
type ResponseAWSRoles ¶
type ResponseAWSRoles struct { Admin string `json:"admin"` AWSOperator string `json:"awsoperator"` }
ResponseAWSRoles is a type used by above AWSData struct.
type ResponseAzure ¶
type ResponseAzure struct {
Credential *ResponseAzureCredential `json:"credential"`
}
ResponseAzure is a type used by above Response struct.
type ResponseAzureCredential ¶
type ResponseAzureCredential struct { ClientID string `json:"client_id"` SubscriptionID string `json:"subscription_id"` TenantID string `json:"tenant_id"` }
ResponseAzureCredential is a type used by above Response struct.