types

package
v0.10.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2022 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package types provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidGrantID = errors.New("invalid grant id")

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func NewGetAccessInstructionsRequest

func NewGetAccessInstructionsRequest(server string, providerId string, params *GetAccessInstructionsParams) (*http.Request, error)

NewGetAccessInstructionsRequest generates requests for GetAccessInstructions

func NewGetGrantsRequest

func NewGetGrantsRequest(server string) (*http.Request, error)

NewGetGrantsRequest generates requests for GetGrants

func NewGetHealthRequest

func NewGetHealthRequest(server string) (*http.Request, error)

NewGetHealthRequest generates requests for GetHealth

func NewGetProviderArgsRequest

func NewGetProviderArgsRequest(server string, providerId string) (*http.Request, error)

NewGetProviderArgsRequest generates requests for GetProviderArgs

func NewGetProviderRequest

func NewGetProviderRequest(server string, providerId string) (*http.Request, error)

NewGetProviderRequest generates requests for GetProvider

func NewGrantID

func NewGrantID() string

func NewListProviderArgOptionsRequest

func NewListProviderArgOptionsRequest(server string, providerId string, argId string) (*http.Request, error)

NewListProviderArgOptionsRequest generates requests for ListProviderArgOptions

func NewListProvidersRequest

func NewListProvidersRequest(server string) (*http.Request, error)

NewListProvidersRequest generates requests for ListProviders

func NewPostGrantsRequest

func NewPostGrantsRequest(server string, body PostGrantsJSONRequestBody) (*http.Request, error)

NewPostGrantsRequest calls the generic PostGrants builder with application/json body

func NewPostGrantsRequestWithBody

func NewPostGrantsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostGrantsRequestWithBody generates requests for PostGrants with any type of body

func NewPostGrantsRevokeRequest

func NewPostGrantsRevokeRequest(server string, grantId string, body PostGrantsRevokeJSONRequestBody) (*http.Request, error)

NewPostGrantsRevokeRequest calls the generic PostGrantsRevoke builder with application/json body

func NewPostGrantsRevokeRequestWithBody added in v0.2.1

func NewPostGrantsRevokeRequestWithBody(server string, grantId string, contentType string, body io.Reader) (*http.Request, error)

NewPostGrantsRevokeRequestWithBody generates requests for PostGrantsRevoke with any type of body

func NewRefreshAccessProvidersRequest added in v0.5.0

func NewRefreshAccessProvidersRequest(server string) (*http.Request, error)

NewRefreshAccessProvidersRequest generates requests for RefreshAccessProviders

func NewValidateGrantRequest added in v0.7.0

func NewValidateGrantRequest(server string, body ValidateGrantJSONRequestBody) (*http.Request, error)

NewValidateGrantRequest calls the generic ValidateGrant builder with application/json body

func NewValidateGrantRequestWithBody added in v0.7.0

func NewValidateGrantRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewValidateGrantRequestWithBody generates requests for ValidateGrant with any type of body

func NewValidateSetupRequest added in v0.4.0

func NewValidateSetupRequest(server string, body ValidateSetupJSONRequestBody) (*http.Request, error)

NewValidateSetupRequest calls the generic ValidateSetup builder with application/json body

func NewValidateSetupRequestWithBody added in v0.4.0

func NewValidateSetupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewValidateSetupRequestWithBody generates requests for ValidateSetup with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type AccessInstructions

type AccessInstructions struct {
	// Instructions on how to access the role or resource.
	Instructions *string `json:"instructions,omitempty"`
}

Instructions on how to access the requested resource.

The `instructions` field will be null if no instructions are available.

type ArgOptionsResponse

type ArgOptionsResponse struct {
	Groups *Groups `json:"groups,omitempty"`

	// The suggested options.
	Options []Option `json:"options"`
}

ArgOptionsResponse defines model for ArgOptionsResponse.

type ArgSchema added in v0.9.0

type ArgSchema struct {
	AdditionalProperties map[string]Argument `json:"-"`
}

ArgSchema defines model for ArgSchema.

func (ArgSchema) Get added in v0.9.0

func (a ArgSchema) Get(fieldName string) (value Argument, found bool)

Getter for additional properties for ArgSchema. Returns the specified element and whether it was found

func (ArgSchema) MarshalJSON added in v0.9.0

func (a ArgSchema) MarshalJSON() ([]byte, error)

Override default JSON handling for ArgSchema to handle AdditionalProperties

func (*ArgSchema) Set added in v0.9.0

func (a *ArgSchema) Set(fieldName string, value Argument)

Setter for additional properties for ArgSchema

func (*ArgSchema) UnmarshalJSON added in v0.9.0

func (a *ArgSchema) UnmarshalJSON(b []byte) error

Override default JSON handling for ArgSchema to handle AdditionalProperties

type Argument added in v0.9.0

type Argument struct {
	Description *string          `json:"description,omitempty"`
	Groups      *Argument_Groups `json:"groups,omitempty"`
	Id          string           `json:"id"`

	// Optional form element for the request form, if not provided, defaults to multiselect
	RequestFormElement *ArgumentRequestFormElement `json:"requestFormElement,omitempty"`
	RuleFormElement    ArgumentRuleFormElement     `json:"ruleFormElement"`
	Title              string                      `json:"title"`
}

Argument defines model for Argument.

type ArgumentRequestFormElement added in v0.10.0

type ArgumentRequestFormElement string

Optional form element for the request form, if not provided, defaults to multiselect

const (
	ArgumentRequestFormElementSELECT ArgumentRequestFormElement = "SELECT"
)

Defines values for ArgumentRequestFormElement.

type ArgumentRuleFormElement added in v0.10.0

type ArgumentRuleFormElement string

ArgumentRuleFormElement defines model for Argument.RuleFormElement.

const (
	ArgumentRuleFormElementINPUT       ArgumentRuleFormElement = "INPUT"
	ArgumentRuleFormElementMULTISELECT ArgumentRuleFormElement = "MULTISELECT"
	ArgumentRuleFormElementSELECT      ArgumentRuleFormElement = "SELECT"
)

Defines values for ArgumentRuleFormElement.

type Argument_Groups added in v0.9.0

type Argument_Groups struct {
	AdditionalProperties map[string]Group `json:"-"`
}

Argument_Groups defines model for Argument.Groups.

func (Argument_Groups) Get added in v0.9.0

func (a Argument_Groups) Get(fieldName string) (value Group, found bool)

Getter for additional properties for Argument_Groups. Returns the specified element and whether it was found

func (Argument_Groups) MarshalJSON added in v0.9.0

func (a Argument_Groups) MarshalJSON() ([]byte, error)

Override default JSON handling for Argument_Groups to handle AdditionalProperties

func (*Argument_Groups) Set added in v0.9.0

func (a *Argument_Groups) Set(fieldName string, value Group)

Setter for additional properties for Argument_Groups

func (*Argument_Groups) UnmarshalJSON added in v0.9.0

func (a *Argument_Groups) UnmarshalJSON(b []byte) error

Override default JSON handling for Argument_Groups to handle AdditionalProperties

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) GetAccessInstructions

func (c *Client) GetAccessInstructions(ctx context.Context, providerId string, params *GetAccessInstructionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetGrants

func (c *Client) GetGrants(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetHealth

func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetProvider

func (c *Client) GetProvider(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetProviderArgs

func (c *Client) GetProviderArgs(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListProviderArgOptions

func (c *Client) ListProviderArgOptions(ctx context.Context, providerId string, argId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListProviders

func (c *Client) ListProviders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostGrants

func (c *Client) PostGrants(ctx context.Context, body PostGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostGrantsRevoke

func (c *Client) PostGrantsRevoke(ctx context.Context, grantId string, body PostGrantsRevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostGrantsRevokeWithBody added in v0.2.1

func (c *Client) PostGrantsRevokeWithBody(ctx context.Context, grantId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostGrantsWithBody

func (c *Client) PostGrantsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RefreshAccessProviders added in v0.5.0

func (c *Client) RefreshAccessProviders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ValidateGrant added in v0.7.0

func (c *Client) ValidateGrant(ctx context.Context, body ValidateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ValidateGrantWithBody added in v0.7.0

func (c *Client) ValidateGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ValidateSetup added in v0.4.0

func (c *Client) ValidateSetup(ctx context.Context, body ValidateSetupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ValidateSetupWithBody added in v0.4.0

func (c *Client) ValidateSetupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetGrants request
	GetGrants(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostGrants request with any body
	PostGrantsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostGrants(ctx context.Context, body PostGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ValidateGrant request with any body
	ValidateGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ValidateGrant(ctx context.Context, body ValidateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostGrantsRevoke request with any body
	PostGrantsRevokeWithBody(ctx context.Context, grantId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostGrantsRevoke(ctx context.Context, grantId string, body PostGrantsRevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHealth request
	GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListProviders request
	ListProviders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RefreshAccessProviders request
	RefreshAccessProviders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetProvider request
	GetProvider(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAccessInstructions request
	GetAccessInstructions(ctx context.Context, providerId string, params *GetAccessInstructionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetProviderArgs request
	GetProviderArgs(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListProviderArgOptions request
	ListProviderArgOptions(ctx context.Context, providerId string, argId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ValidateSetup request with any body
	ValidateSetupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ValidateSetup(ctx context.Context, body ValidateSetupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) GetAccessInstructionsWithResponse

func (c *ClientWithResponses) GetAccessInstructionsWithResponse(ctx context.Context, providerId string, params *GetAccessInstructionsParams, reqEditors ...RequestEditorFn) (*GetAccessInstructionsResponse, error)

GetAccessInstructionsWithResponse request returning *GetAccessInstructionsResponse

func (*ClientWithResponses) GetGrantsWithResponse

func (c *ClientWithResponses) GetGrantsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetGrantsResponse, error)

GetGrantsWithResponse request returning *GetGrantsResponse

func (*ClientWithResponses) GetHealthWithResponse

func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

GetHealthWithResponse request returning *GetHealthResponse

func (*ClientWithResponses) GetProviderArgsWithResponse

func (c *ClientWithResponses) GetProviderArgsWithResponse(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*GetProviderArgsResponse, error)

GetProviderArgsWithResponse request returning *GetProviderArgsResponse

func (*ClientWithResponses) GetProviderWithResponse

func (c *ClientWithResponses) GetProviderWithResponse(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*GetProviderResponse, error)

GetProviderWithResponse request returning *GetProviderResponse

func (*ClientWithResponses) ListProviderArgOptionsWithResponse

func (c *ClientWithResponses) ListProviderArgOptionsWithResponse(ctx context.Context, providerId string, argId string, reqEditors ...RequestEditorFn) (*ListProviderArgOptionsResponse, error)

ListProviderArgOptionsWithResponse request returning *ListProviderArgOptionsResponse

func (*ClientWithResponses) ListProvidersWithResponse

func (c *ClientWithResponses) ListProvidersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListProvidersResponse, error)

ListProvidersWithResponse request returning *ListProvidersResponse

func (*ClientWithResponses) PostGrantsRevokeWithBodyWithResponse added in v0.2.1

func (c *ClientWithResponses) PostGrantsRevokeWithBodyWithResponse(ctx context.Context, grantId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGrantsRevokeResponse, error)

PostGrantsRevokeWithBodyWithResponse request with arbitrary body returning *PostGrantsRevokeResponse

func (*ClientWithResponses) PostGrantsRevokeWithResponse

func (c *ClientWithResponses) PostGrantsRevokeWithResponse(ctx context.Context, grantId string, body PostGrantsRevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGrantsRevokeResponse, error)

func (*ClientWithResponses) PostGrantsWithBodyWithResponse

func (c *ClientWithResponses) PostGrantsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGrantsResponse, error)

PostGrantsWithBodyWithResponse request with arbitrary body returning *PostGrantsResponse

func (*ClientWithResponses) PostGrantsWithResponse

func (c *ClientWithResponses) PostGrantsWithResponse(ctx context.Context, body PostGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGrantsResponse, error)

func (*ClientWithResponses) RefreshAccessProvidersWithResponse added in v0.5.0

func (c *ClientWithResponses) RefreshAccessProvidersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAccessProvidersResponse, error)

RefreshAccessProvidersWithResponse request returning *RefreshAccessProvidersResponse

func (*ClientWithResponses) ValidateGrantWithBodyWithResponse added in v0.7.0

func (c *ClientWithResponses) ValidateGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateGrantResponse, error)

ValidateGrantWithBodyWithResponse request with arbitrary body returning *ValidateGrantResponse

func (*ClientWithResponses) ValidateGrantWithResponse added in v0.7.0

func (c *ClientWithResponses) ValidateGrantWithResponse(ctx context.Context, body ValidateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateGrantResponse, error)

func (*ClientWithResponses) ValidateSetupWithBodyWithResponse added in v0.4.0

func (c *ClientWithResponses) ValidateSetupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateSetupResponse, error)

ValidateSetupWithBodyWithResponse request with arbitrary body returning *ValidateSetupResponse

func (*ClientWithResponses) ValidateSetupWithResponse added in v0.4.0

func (c *ClientWithResponses) ValidateSetupWithResponse(ctx context.Context, body ValidateSetupJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateSetupResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetGrants request
	GetGrantsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetGrantsResponse, error)

	// PostGrants request with any body
	PostGrantsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGrantsResponse, error)

	PostGrantsWithResponse(ctx context.Context, body PostGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGrantsResponse, error)

	// ValidateGrant request with any body
	ValidateGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateGrantResponse, error)

	ValidateGrantWithResponse(ctx context.Context, body ValidateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateGrantResponse, error)

	// PostGrantsRevoke request with any body
	PostGrantsRevokeWithBodyWithResponse(ctx context.Context, grantId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGrantsRevokeResponse, error)

	PostGrantsRevokeWithResponse(ctx context.Context, grantId string, body PostGrantsRevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGrantsRevokeResponse, error)

	// GetHealth request
	GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

	// ListProviders request
	ListProvidersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListProvidersResponse, error)

	// RefreshAccessProviders request
	RefreshAccessProvidersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshAccessProvidersResponse, error)

	// GetProvider request
	GetProviderWithResponse(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*GetProviderResponse, error)

	// GetAccessInstructions request
	GetAccessInstructionsWithResponse(ctx context.Context, providerId string, params *GetAccessInstructionsParams, reqEditors ...RequestEditorFn) (*GetAccessInstructionsResponse, error)

	// GetProviderArgs request
	GetProviderArgsWithResponse(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*GetProviderArgsResponse, error)

	// ListProviderArgOptions request
	ListProviderArgOptionsWithResponse(ctx context.Context, providerId string, argId string, reqEditors ...RequestEditorFn) (*ListProviderArgOptionsResponse, error)

	// ValidateSetup request with any body
	ValidateSetupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateSetupResponse, error)

	ValidateSetupWithResponse(ctx context.Context, body ValidateSetupJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateSetupResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateGrant

type CreateGrant struct {
	// The end time of the grant in ISO8601 format.
	End iso8601.Time `json:"end"`

	// An id to assign to this new grant
	Id string `json:"id"`

	// The ID of the provider to grant access to.
	Provider string `json:"provider"`

	// The start time of the grant in ISO8601 format.
	Start iso8601.Time `json:"start"`

	// The email address of the user to grant access to.
	Subject openapi_types.Email `json:"subject"`

	// Provider-specific grant data. Must match the provider's schema.
	With CreateGrant_With `json:"with"`
}

A grant to be created.

func (*CreateGrant) Validate

func (cg *CreateGrant) Validate(ctx context.Context, now time.Time) (*ValidCreateGrant, error)

Validate a grant. If a grant is valid, a ValidGrant object is returned.

Currently this doesn't do any validation of the `with` field against our providers.

type CreateGrant_With

type CreateGrant_With struct {
	AdditionalProperties map[string]string `json:"-"`
}

Provider-specific grant data. Must match the provider's schema.

func (CreateGrant_With) Get

func (a CreateGrant_With) Get(fieldName string) (value string, found bool)

Getter for additional properties for CreateGrant_With. Returns the specified element and whether it was found

func (CreateGrant_With) MarshalJSON

func (a CreateGrant_With) MarshalJSON() ([]byte, error)

Override default JSON handling for CreateGrant_With to handle AdditionalProperties

func (*CreateGrant_With) Set

func (a *CreateGrant_With) Set(fieldName string, value string)

Setter for additional properties for CreateGrant_With

func (*CreateGrant_With) UnmarshalJSON

func (a *CreateGrant_With) UnmarshalJSON(b []byte) error

Override default JSON handling for CreateGrant_With to handle AdditionalProperties

type ErrInvalidGrantTime

type ErrInvalidGrantTime struct {
	Msg string
}

func (ErrInvalidGrantTime) Error

func (e ErrInvalidGrantTime) Error() string

type ErrorResponse

type ErrorResponse struct {
	Error *string `json:"error,omitempty"`
}

ErrorResponse defines model for ErrorResponse.

type GetAccessInstructionsParams

type GetAccessInstructionsParams struct {
	// the user's email address
	Subject string `form:"subject" json:"subject"`

	// the argument payload in JSON format
	Args string `form:"args" json:"args"`

	// ID of the grant instructions
	GrantId string `form:"grantId" json:"grantId"`
}

GetAccessInstructionsParams defines parameters for GetAccessInstructions.

type GetAccessInstructionsResponse

type GetAccessInstructionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AccessInstructions
	JSON400      *struct {
		Error *string `json:"error,omitempty"`
	}
	JSON404 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParseGetAccessInstructionsResponse

func ParseGetAccessInstructionsResponse(rsp *http.Response) (*GetAccessInstructionsResponse, error)

ParseGetAccessInstructionsResponse parses an HTTP response from a GetAccessInstructionsWithResponse call

func (GetAccessInstructionsResponse) Status

Status returns HTTPResponse.Status

func (GetAccessInstructionsResponse) StatusCode

func (r GetAccessInstructionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetGrantsResponse

type GetGrantsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Grants *[]Grant `json:"grants,omitempty"`
	}
	JSON500 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParseGetGrantsResponse

func ParseGetGrantsResponse(rsp *http.Response) (*GetGrantsResponse, error)

ParseGetGrantsResponse parses an HTTP response from a GetGrantsWithResponse call

func (GetGrantsResponse) Status

func (r GetGrantsResponse) Status() string

Status returns HTTPResponse.Status

func (GetGrantsResponse) StatusCode

func (r GetGrantsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHealthResponse

type GetHealthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Health *ProviderHealth `json:"health,omitempty"`
	}
	JSON500 *struct {
		Health *ProviderHealth `json:"health,omitempty"`
	}
}

func ParseGetHealthResponse

func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error)

ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call

func (GetHealthResponse) Status

func (r GetHealthResponse) Status() string

Status returns HTTPResponse.Status

func (GetHealthResponse) StatusCode

func (r GetHealthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetProviderArgsResponse

type GetProviderArgsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ArgSchema
	JSON404      *struct {
		Error *string `json:"error,omitempty"`
	}
	JSON500 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParseGetProviderArgsResponse

func ParseGetProviderArgsResponse(rsp *http.Response) (*GetProviderArgsResponse, error)

ParseGetProviderArgsResponse parses an HTTP response from a GetProviderArgsWithResponse call

func (GetProviderArgsResponse) Status

func (r GetProviderArgsResponse) Status() string

Status returns HTTPResponse.Status

func (GetProviderArgsResponse) StatusCode

func (r GetProviderArgsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetProviderResponse

type GetProviderResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Provider
	JSON404      *struct {
		Error *string `json:"error,omitempty"`
	}
	JSON500 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParseGetProviderResponse

func ParseGetProviderResponse(rsp *http.Response) (*GetProviderResponse, error)

ParseGetProviderResponse parses an HTTP response from a GetProviderWithResponse call

func (GetProviderResponse) Status

func (r GetProviderResponse) Status() string

Status returns HTTPResponse.Status

func (GetProviderResponse) StatusCode

func (r GetProviderResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Grant

type Grant struct {
	// The end time of the grant in ISO8601 format.
	End iso8601.Time `json:"end"`
	ID  string       `json:"id"`

	// The ID of the provider to grant access to.
	Provider string `json:"provider"`

	// The start time of the grant in ISO8601 format.
	Start iso8601.Time `json:"start"`

	// The current state of the grant.
	Status GrantStatus `json:"status"`

	// The email address of the user to grant access to.
	Subject openapi_types.Email `json:"subject"`

	// Provider-specific grant data. Must match the provider's schema.
	With Grant_With `json:"with"`
}

A temporary assignment of a user to a principal.

func NewGrant

func NewGrant(vcg ValidCreateGrant) Grant

NewGrant creates a pending Grant from a validated CreateGrant payload.

type GrantResponse

type GrantResponse struct {
	// A temporary assignment of a user to a principal.
	Grant Grant `json:"grant"`
}

GrantResponse defines model for GrantResponse.

type GrantStatus

type GrantStatus string

The current state of the grant.

const (
	GrantStatusACTIVE  GrantStatus = "ACTIVE"
	GrantStatusERROR   GrantStatus = "ERROR"
	GrantStatusEXPIRED GrantStatus = "EXPIRED"
	GrantStatusPENDING GrantStatus = "PENDING"
	GrantStatusREVOKED GrantStatus = "REVOKED"
)

Defines values for GrantStatus.

type Grant_With

type Grant_With struct {
	AdditionalProperties map[string]string `json:"-"`
}

Provider-specific grant data. Must match the provider's schema.

func (Grant_With) Get

func (a Grant_With) Get(fieldName string) (value string, found bool)

Getter for additional properties for Grant_With. Returns the specified element and whether it was found

func (Grant_With) MarshalJSON

func (a Grant_With) MarshalJSON() ([]byte, error)

Override default JSON handling for Grant_With to handle AdditionalProperties

func (*Grant_With) Set

func (a *Grant_With) Set(fieldName string, value string)

Setter for additional properties for Grant_With

func (*Grant_With) UnmarshalJSON

func (a *Grant_With) UnmarshalJSON(b []byte) error

Override default JSON handling for Grant_With to handle AdditionalProperties

type Group added in v0.9.0

type Group struct {
	Description *string `json:"description,omitempty"`
	Id          string  `json:"id"`
	Title       string  `json:"title"`
}

Group defines model for Group.

type GroupOption added in v0.9.0

type GroupOption struct {
	Children    []string `json:"children"`
	Description *string  `json:"description,omitempty"`
	Label       string   `json:"label"`

	// A label prefix allows additional context to be prefixed to the label when displayed in a form
	LabelPrefix *string `json:"labelPrefix,omitempty"`
	Value       string  `json:"value"`
}

GroupOption defines model for GroupOption.

type Groups added in v0.9.0

type Groups struct {
	AdditionalProperties map[string][]GroupOption `json:"-"`
}

Groups defines model for Groups.

func (Groups) Get added in v0.9.0

func (a Groups) Get(fieldName string) (value []GroupOption, found bool)

Getter for additional properties for Groups. Returns the specified element and whether it was found

func (Groups) MarshalJSON added in v0.9.0

func (a Groups) MarshalJSON() ([]byte, error)

Override default JSON handling for Groups to handle AdditionalProperties

func (*Groups) Set added in v0.9.0

func (a *Groups) Set(fieldName string, value []GroupOption)

Setter for additional properties for Groups

func (*Groups) UnmarshalJSON added in v0.9.0

func (a *Groups) UnmarshalJSON(b []byte) error

Override default JSON handling for Groups to handle AdditionalProperties

type HealthResponse

type HealthResponse struct {
	Health *ProviderHealth `json:"health,omitempty"`
}

HealthResponse defines model for HealthResponse.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type ListProviderArgOptionsResponse

type ListProviderArgOptionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Groups *Groups `json:"groups,omitempty"`

		// The suggested options.
		Options []Option `json:"options"`
	}
	JSON404 *struct {
		Error *string `json:"error,omitempty"`
	}
	JSON500 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParseListProviderArgOptionsResponse

func ParseListProviderArgOptionsResponse(rsp *http.Response) (*ListProviderArgOptionsResponse, error)

ParseListProviderArgOptionsResponse parses an HTTP response from a ListProviderArgOptionsWithResponse call

func (ListProviderArgOptionsResponse) Status

Status returns HTTPResponse.Status

func (ListProviderArgOptionsResponse) StatusCode

func (r ListProviderArgOptionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListProvidersResponse

type ListProvidersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Provider
	JSON500      *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParseListProvidersResponse

func ParseListProvidersResponse(rsp *http.Response) (*ListProvidersResponse, error)

ParseListProvidersResponse parses an HTTP response from a ListProvidersWithResponse call

func (ListProvidersResponse) Status

func (r ListProvidersResponse) Status() string

Status returns HTTPResponse.Status

func (ListProvidersResponse) StatusCode

func (r ListProvidersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Log added in v0.4.0

type Log struct {
	// The log level.
	Level LogLevel `json:"level"`

	// The log message.
	Msg string `json:"msg"`
}

A log entry.

type LogLevel added in v0.4.0

type LogLevel string

The log level.

const (
	LogLevelERROR   LogLevel = "ERROR"
	LogLevelINFO    LogLevel = "INFO"
	LogLevelWARNING LogLevel = "WARNING"
)

Defines values for LogLevel.

type MiddlewareFunc

type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc

type Option

type Option struct {
	Description *string `json:"description,omitempty"`
	Label       string  `json:"label"`
	Value       string  `json:"value"`
}

Option defines model for Option.

type PostGrantsJSONBody

type PostGrantsJSONBody = CreateGrant

PostGrantsJSONBody defines parameters for PostGrants.

type PostGrantsJSONRequestBody

type PostGrantsJSONRequestBody = PostGrantsJSONBody

PostGrantsJSONRequestBody defines body for PostGrants for application/json ContentType.

type PostGrantsResponse

type PostGrantsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *struct {
		// A temporary assignment of a user to a principal.
		Grant Grant `json:"grant"`
	}
	JSON400 *struct {
		Error *string `json:"error,omitempty"`
	}
	JSON500 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParsePostGrantsResponse

func ParsePostGrantsResponse(rsp *http.Response) (*PostGrantsResponse, error)

ParsePostGrantsResponse parses an HTTP response from a PostGrantsWithResponse call

func (PostGrantsResponse) Status

func (r PostGrantsResponse) Status() string

Status returns HTTPResponse.Status

func (PostGrantsResponse) StatusCode

func (r PostGrantsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostGrantsRevokeJSONBody added in v0.2.1

type PostGrantsRevokeJSONBody struct {
	// An id representiing the user calling this API will be included in the GrantRevoked event
	RevokerId string `json:"revokerId"`
}

PostGrantsRevokeJSONBody defines parameters for PostGrantsRevoke.

type PostGrantsRevokeJSONRequestBody added in v0.2.1

type PostGrantsRevokeJSONRequestBody PostGrantsRevokeJSONBody

PostGrantsRevokeJSONRequestBody defines body for PostGrantsRevoke for application/json ContentType.

type PostGrantsRevokeResponse

type PostGrantsRevokeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// A temporary assignment of a user to a principal.
		Grant Grant `json:"grant"`
	}
	JSON400 *struct {
		Error *string `json:"error,omitempty"`
	}
	JSON500 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParsePostGrantsRevokeResponse

func ParsePostGrantsRevokeResponse(rsp *http.Response) (*PostGrantsRevokeResponse, error)

ParsePostGrantsRevokeResponse parses an HTTP response from a PostGrantsRevokeWithResponse call

func (PostGrantsRevokeResponse) Status

func (r PostGrantsRevokeResponse) Status() string

Status returns HTTPResponse.Status

func (PostGrantsRevokeResponse) StatusCode

func (r PostGrantsRevokeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Provider

type Provider struct {
	Id   string `json:"id"`
	Type string `json:"type"`
}

Provider

type ProviderConfigValidation added in v0.4.0

type ProviderConfigValidation struct {
	// The particular config fields validated, if any.
	FieldsValidated []string `json:"fieldsValidated"`

	// The ID of the validation, such as `list-sso-users`.
	Id   string `json:"id"`
	Logs []Log  `json:"logs"`
	Name string `json:"name"`

	// The status of the validation.
	Status ProviderConfigValidationStatus `json:"status"`
}

A validation against the configuration values of the Access Provider.

type ProviderConfigValidationStatus added in v0.4.0

type ProviderConfigValidationStatus string

The status of the validation.

const (
	ERROR      ProviderConfigValidationStatus = "ERROR"
	INPROGRESS ProviderConfigValidationStatus = "IN_PROGRESS"
	PENDING    ProviderConfigValidationStatus = "PENDING"
	SUCCESS    ProviderConfigValidationStatus = "SUCCESS"
)

Defines values for ProviderConfigValidationStatus.

type ProviderHealth

type ProviderHealth struct {
	// A descriptive error message, if the provider isn't healthy.
	Error *string `json:"error"`

	// Whether the provider is healthy.
	Healthy bool `json:"healthy"`

	// The provider ID.
	ID string `json:"id"`
}

ProviderHealth defines model for ProviderHealth.

type RefreshAccessProvidersResponse added in v0.5.0

type RefreshAccessProvidersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Provider
}

func ParseRefreshAccessProvidersResponse added in v0.5.0

func ParseRefreshAccessProvidersResponse(rsp *http.Response) (*RefreshAccessProvidersResponse, error)

ParseRefreshAccessProvidersResponse parses an HTTP response from a RefreshAccessProvidersWithResponse call

func (RefreshAccessProvidersResponse) Status added in v0.5.0

Status returns HTTPResponse.Status

func (RefreshAccessProvidersResponse) StatusCode added in v0.5.0

func (r RefreshAccessProvidersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ServerInterface

type ServerInterface interface {
	// List Grants
	// (GET /api/v1/grants)
	GetGrants(w http.ResponseWriter, r *http.Request)
	// Create Grant
	// (POST /api/v1/grants)
	PostGrants(w http.ResponseWriter, r *http.Request)
	// ValidateGrant
	// (POST /api/v1/grants/validate)
	ValidateGrant(w http.ResponseWriter, r *http.Request)
	// Revoke grant
	// (POST /api/v1/grants/{grantId}/revoke)
	PostGrantsRevoke(w http.ResponseWriter, r *http.Request, grantId string)
	// Healthcheck
	// (GET /api/v1/health)
	GetHealth(w http.ResponseWriter, r *http.Request)
	// List providers
	// (GET /api/v1/providers)
	ListProviders(w http.ResponseWriter, r *http.Request)
	// Refresh Access Providers
	// (POST /api/v1/providers/refresh)
	RefreshAccessProviders(w http.ResponseWriter, r *http.Request)
	// Get provider
	// (GET /api/v1/providers/{providerId})
	GetProvider(w http.ResponseWriter, r *http.Request, providerId string)
	// Get Access Instructions
	// (GET /api/v1/providers/{providerId}/access-instructions)
	GetAccessInstructions(w http.ResponseWriter, r *http.Request, providerId string, params GetAccessInstructionsParams)
	// Get provider arg schema
	// (GET /api/v1/providers/{providerId}/args)
	GetProviderArgs(w http.ResponseWriter, r *http.Request, providerId string)
	// List provider arg options
	// (GET /api/v1/providers/{providerId}/args/{argId}/options)
	ListProviderArgOptions(w http.ResponseWriter, r *http.Request, providerId string, argId string)
	// Validate an Access Provider's settings
	// (POST /api/v1/setup/validate)
	ValidateSetup(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetAccessInstructions

func (siw *ServerInterfaceWrapper) GetAccessInstructions(w http.ResponseWriter, r *http.Request)

GetAccessInstructions operation middleware

func (*ServerInterfaceWrapper) GetGrants

func (siw *ServerInterfaceWrapper) GetGrants(w http.ResponseWriter, r *http.Request)

GetGrants operation middleware

func (*ServerInterfaceWrapper) GetHealth

func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth operation middleware

func (*ServerInterfaceWrapper) GetProvider

func (siw *ServerInterfaceWrapper) GetProvider(w http.ResponseWriter, r *http.Request)

GetProvider operation middleware

func (*ServerInterfaceWrapper) GetProviderArgs

func (siw *ServerInterfaceWrapper) GetProviderArgs(w http.ResponseWriter, r *http.Request)

GetProviderArgs operation middleware

func (*ServerInterfaceWrapper) ListProviderArgOptions

func (siw *ServerInterfaceWrapper) ListProviderArgOptions(w http.ResponseWriter, r *http.Request)

ListProviderArgOptions operation middleware

func (*ServerInterfaceWrapper) ListProviders

func (siw *ServerInterfaceWrapper) ListProviders(w http.ResponseWriter, r *http.Request)

ListProviders operation middleware

func (*ServerInterfaceWrapper) PostGrants

func (siw *ServerInterfaceWrapper) PostGrants(w http.ResponseWriter, r *http.Request)

PostGrants operation middleware

func (*ServerInterfaceWrapper) PostGrantsRevoke

func (siw *ServerInterfaceWrapper) PostGrantsRevoke(w http.ResponseWriter, r *http.Request)

PostGrantsRevoke operation middleware

func (*ServerInterfaceWrapper) RefreshAccessProviders added in v0.5.0

func (siw *ServerInterfaceWrapper) RefreshAccessProviders(w http.ResponseWriter, r *http.Request)

RefreshAccessProviders operation middleware

func (*ServerInterfaceWrapper) ValidateGrant added in v0.7.0

func (siw *ServerInterfaceWrapper) ValidateGrant(w http.ResponseWriter, r *http.Request)

ValidateGrant operation middleware

func (*ServerInterfaceWrapper) ValidateSetup added in v0.4.0

func (siw *ServerInterfaceWrapper) ValidateSetup(w http.ResponseWriter, r *http.Request)

ValidateSetup operation middleware

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type ValidCreateGrant

type ValidCreateGrant struct {
	CreateGrant
}

ValidCreateGrant is a grant which has been validated.

calling .Validate() on a CreateGrant will give you a ValidCreateGrant object if validation passes.

We use ValidCreateGrant wherever possible in the codebase to ensure that only validated grants are provisioned.

type ValidateGrantJSONBody added in v0.7.0

type ValidateGrantJSONBody = CreateGrant

ValidateGrantJSONBody defines parameters for ValidateGrant.

type ValidateGrantJSONRequestBody added in v0.7.0

type ValidateGrantJSONRequestBody = ValidateGrantJSONBody

ValidateGrantJSONRequestBody defines body for ValidateGrant for application/json ContentType.

type ValidateGrantResponse added in v0.7.0

type ValidateGrantResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *struct {
		Error *string `json:"error,omitempty"`
	}
	JSON500 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParseValidateGrantResponse added in v0.7.0

func ParseValidateGrantResponse(rsp *http.Response) (*ValidateGrantResponse, error)

ParseValidateGrantResponse parses an HTTP response from a ValidateGrantWithResponse call

func (ValidateGrantResponse) Status added in v0.7.0

func (r ValidateGrantResponse) Status() string

Status returns HTTPResponse.Status

func (ValidateGrantResponse) StatusCode added in v0.7.0

func (r ValidateGrantResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ValidateRequest added in v0.4.0

type ValidateRequest struct {
	// The full type definition of the provider
	Uses string `json:"uses"`

	// The provider's configuration.
	With map[string]string `json:"with"`
}

ValidateRequest defines model for ValidateRequest.

type ValidateResponse added in v0.4.0

type ValidateResponse struct {
	Validations []ProviderConfigValidation `json:"validations"`
}

ValidateResponse defines model for ValidateResponse.

type ValidateSetupJSONRequestBody added in v0.4.0

type ValidateSetupJSONRequestBody ValidateRequest

ValidateSetupJSONRequestBody defines body for ValidateSetup for application/json ContentType.

type ValidateSetupResponse added in v0.4.0

type ValidateSetupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Validations []ProviderConfigValidation `json:"validations"`
	}
	JSON400 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParseValidateSetupResponse added in v0.4.0

func ParseValidateSetupResponse(rsp *http.Response) (*ValidateSetupResponse, error)

ParseValidateSetupResponse parses an HTTP response from a ValidateSetupWithResponse call

func (ValidateSetupResponse) Status added in v0.4.0

func (r ValidateSetupResponse) Status() string

Status returns HTTPResponse.Status

func (ValidateSetupResponse) StatusCode added in v0.4.0

func (r ValidateSetupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Directories

Path Synopsis
Package ahmocks is a generated GoMock package.
Package ahmocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL