internal

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeleteidentityRequest

func NewDeleteidentityRequest(server string, params *DeleteidentityParams) (*http.Request, error)

NewDeleteidentityRequest generates requests for Deleteidentity

func NewGetcredRequest

func NewGetcredRequest(server string, params *GetcredParams) (*http.Request, error)

NewGetcredRequest generates requests for Getcred

func NewGetcredsRequest

func NewGetcredsRequest(server string, params *GetcredsParams, body GetcredsJSONRequestBody) (*http.Request, error)

NewGetcredsRequest calls the generic Getcreds builder with application/json body

func NewGetcredsRequestWithBody

func NewGetcredsRequestWithBody(server string, params *GetcredsParams, contentType string, body io.Reader) (*http.Request, error)

NewGetcredsRequestWithBody generates requests for Getcreds with any type of body

func NewMoveidentityRequest

func NewMoveidentityRequest(server string, params *MoveidentityParams, body MoveidentityJSONRequestBody) (*http.Request, error)

NewMoveidentityRequest calls the generic Moveidentity builder with application/json body

func NewMoveidentityRequestWithBody

func NewMoveidentityRequestWithBody(server string, params *MoveidentityParams, contentType string, body io.Reader) (*http.Request, error)

NewMoveidentityRequestWithBody generates requests for Moveidentity with any type of body

Types

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) Deleteidentity

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

func (*Client) Getcred

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

func (*Client) Getcreds

func (c *Client) Getcreds(ctx context.Context, params *GetcredsParams, body GetcredsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetcredsWithBody

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

func (*Client) Moveidentity

func (c *Client) Moveidentity(ctx context.Context, params *MoveidentityParams, body MoveidentityJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) MoveidentityWithBody

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

type ClientInterface

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

	// Getcred request
	Getcred(ctx context.Context, params *GetcredParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	Getcreds(ctx context.Context, params *GetcredsParams, body GetcredsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	Moveidentity(ctx context.Context, params *MoveidentityParams, body MoveidentityJSONRequestBody, 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) DeleteidentityWithResponse

func (c *ClientWithResponses) DeleteidentityWithResponse(ctx context.Context, params *DeleteidentityParams, reqEditors ...RequestEditorFn) (*DeleteidentityResponse, error)

DeleteidentityWithResponse request returning *DeleteidentityResponse

func (*ClientWithResponses) GetcredWithResponse

func (c *ClientWithResponses) GetcredWithResponse(ctx context.Context, params *GetcredParams, reqEditors ...RequestEditorFn) (*GetcredResponse, error)

GetcredWithResponse request returning *GetcredResponse

func (*ClientWithResponses) GetcredsWithBodyWithResponse

func (c *ClientWithResponses) GetcredsWithBodyWithResponse(ctx context.Context, params *GetcredsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetcredsResponse, error)

GetcredsWithBodyWithResponse request with arbitrary body returning *GetcredsResponse

func (*ClientWithResponses) GetcredsWithResponse

func (c *ClientWithResponses) GetcredsWithResponse(ctx context.Context, params *GetcredsParams, body GetcredsJSONRequestBody, reqEditors ...RequestEditorFn) (*GetcredsResponse, error)

func (*ClientWithResponses) MoveidentityWithBodyWithResponse

func (c *ClientWithResponses) MoveidentityWithBodyWithResponse(ctx context.Context, params *MoveidentityParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MoveidentityResponse, error)

MoveidentityWithBodyWithResponse request with arbitrary body returning *MoveidentityResponse

func (*ClientWithResponses) MoveidentityWithResponse

func (c *ClientWithResponses) MoveidentityWithResponse(ctx context.Context, params *MoveidentityParams, body MoveidentityJSONRequestBody, reqEditors ...RequestEditorFn) (*MoveidentityResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// DeleteidentityWithResponse request
	DeleteidentityWithResponse(ctx context.Context, params *DeleteidentityParams, reqEditors ...RequestEditorFn) (*DeleteidentityResponse, error)

	// GetcredWithResponse request
	GetcredWithResponse(ctx context.Context, params *GetcredParams, reqEditors ...RequestEditorFn) (*GetcredResponse, error)

	// GetcredsWithBodyWithResponse request with any body
	GetcredsWithBodyWithResponse(ctx context.Context, params *GetcredsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetcredsResponse, error)

	GetcredsWithResponse(ctx context.Context, params *GetcredsParams, body GetcredsJSONRequestBody, reqEditors ...RequestEditorFn) (*GetcredsResponse, error)

	// MoveidentityWithBodyWithResponse request with any body
	MoveidentityWithBodyWithResponse(ctx context.Context, params *MoveidentityParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MoveidentityResponse, error)

	MoveidentityWithResponse(ctx context.Context, params *MoveidentityParams, body MoveidentityJSONRequestBody, reqEditors ...RequestEditorFn) (*MoveidentityResponse, error)
}

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

type CredRequestDefinition

type CredRequestDefinition struct {
	// CustomClaims The custom claims to include into X509 Certificate
	CustomClaims *CustomClaims `json:"customClaims,omitempty"`

	// DelegatedResources The source resource identities.
	DelegatedResources *[]string `json:"delegatedResources,omitempty"`

	// IdentityIds The identities to retrieve.
	IdentityIds *[]string `json:"identityIds,omitempty"`
}

CredRequestDefinition defines model for CredRequestDefinition.

type CustomClaims

type CustomClaims struct {
	// XmsAzNwperimid The list of network perimeter ids. Maximum 5 network perimeter ids are supported
	XmsAzNwperimid *[]string `json:"xms_az_nwperimid,omitempty"`

	// XmsAzTm The trust mode of the azure resource asserted by RP. The value can either be 'azureinfra' or 'user'
	XmsAzTm *string `json:"xms_az_tm,omitempty"`
}

CustomClaims The custom claims to include into X509 Certificate

type DelegatedResource

type DelegatedResource struct {
	// DelegationId MIRP delegationRecord persistent id.
	DelegationId *string `json:"delegation_id,omitempty"`

	// DelegationUrl URL to perform RP-to-RP delegation for non-ARM resources, requiring manual onboarding via MIRP team.
	DelegationUrl *string `json:"delegation_url,omitempty"`

	// ExplicitIdentities The identities requested by the caller.
	ExplicitIdentities *[]UserAssignedIdentityCredentials `json:"explicit_identities,omitempty"`

	// ImplicitIdentity A managed identity credentials object.
	ImplicitIdentity *UserAssignedIdentityCredentials `json:"implicit_identity,omitempty"`

	// InternalId Source resource Azure resource internal id.
	InternalId *string `json:"internal_id,omitempty"`

	// ResourceId Source resource Azure resource id.
	ResourceId *string `json:"resource_id,omitempty"`
}

DelegatedResource A delegated resource credentials object

type DeleteidentityParams

type DeleteidentityParams struct {
	// ApiVersion The api version to use in the call. The caller must add this, it isn't included in the x-ms-identity-url header from ARM.
	ApiVersion DeleteidentityParamsApiVersion `form:"api-version" json:"api-version"`
}

DeleteidentityParams defines parameters for Deleteidentity.

type DeleteidentityParamsApiVersion

type DeleteidentityParamsApiVersion string

DeleteidentityParamsApiVersion defines parameters for Deleteidentity.

const (
	DeleteidentityParamsApiVersionN20240101T000000Z DeleteidentityParamsApiVersion = "2024-01-01T00:00:00Z"
)

Defines values for DeleteidentityParamsApiVersion.

type DeleteidentityResponse

type DeleteidentityResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON404      *ErrorResponse
	JSON405      *ErrorResponse
	JSON429      *ErrorResponse
	JSON500      *ErrorResponse
	JSON503      *ErrorResponse
}

func ParseDeleteidentityResponse

func ParseDeleteidentityResponse(rsp *http.Response) (*DeleteidentityResponse, error)

ParseDeleteidentityResponse parses an HTTP response from a DeleteidentityWithResponse call

func (DeleteidentityResponse) Status

func (r DeleteidentityResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteidentityResponse) StatusCode

func (r DeleteidentityResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ErrorResponse

type ErrorResponse struct {
	Error *struct {
		// Code The error code.
		Code *string `json:"code,omitempty"`

		// Message A message describing the error.
		Message *string `json:"message,omitempty"`
	} `json:"error,omitempty"`
}

ErrorResponse defines model for ErrorResponse.

type GetcredParams

type GetcredParams struct {
	// ApiVersion The api version to use in the call. The caller must add this, it isn't included in the x-ms-identity-url header from ARM.
	ApiVersion GetcredParamsApiVersion `form:"api-version" json:"api-version"`
}

GetcredParams defines parameters for Getcred.

type GetcredParamsApiVersion

type GetcredParamsApiVersion string

GetcredParamsApiVersion defines parameters for Getcred.

const (
	GetcredParamsApiVersionN20240101T000000Z GetcredParamsApiVersion = "2024-01-01T00:00:00Z"
)

Defines values for GetcredParamsApiVersion.

type GetcredResponse

type GetcredResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ManagedIdentityCredentials
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON404      *ErrorResponse
	JSON429      *ErrorResponse
	JSON500      *ErrorResponse
	JSON503      *ErrorResponse
}

func ParseGetcredResponse

func ParseGetcredResponse(rsp *http.Response) (*GetcredResponse, error)

ParseGetcredResponse parses an HTTP response from a GetcredWithResponse call

func (GetcredResponse) Status

func (r GetcredResponse) Status() string

Status returns HTTPResponse.Status

func (GetcredResponse) StatusCode

func (r GetcredResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetcredsJSONRequestBody

type GetcredsJSONRequestBody = CredRequestDefinition

GetcredsJSONRequestBody defines body for Getcreds for application/json ContentType.

type GetcredsParams

type GetcredsParams struct {
	// ApiVersion The api version to use in the call. The caller must add this, it isn't included in the x-ms-identity-url header from ARM.
	ApiVersion GetcredsParamsApiVersion `form:"api-version" json:"api-version"`
}

GetcredsParams defines parameters for Getcreds.

type GetcredsParamsApiVersion

type GetcredsParamsApiVersion string

GetcredsParamsApiVersion defines parameters for Getcreds.

const (
	GetcredsParamsApiVersionN20240101T000000Z GetcredsParamsApiVersion = "2024-01-01T00:00:00Z"
)

Defines values for GetcredsParamsApiVersion.

type GetcredsResponse

type GetcredsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ManagedIdentityCredentials
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON404      *ErrorResponse
	JSON405      *ErrorResponse
	JSON429      *ErrorResponse
	JSON500      *ErrorResponse
	JSON503      *ErrorResponse
}

func ParseGetcredsResponse

func ParseGetcredsResponse(rsp *http.Response) (*GetcredsResponse, error)

ParseGetcredsResponse parses an HTTP response from a GetcredsWithResponse call

func (GetcredsResponse) Status

func (r GetcredsResponse) Status() string

Status returns HTTPResponse.Status

func (GetcredsResponse) StatusCode

func (r GetcredsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ManagedIdentityCredentials

type ManagedIdentityCredentials struct {
	// AuthenticationEndpoint The AAD authentication endpoint for the identity system assigned identity. You can make token request toward this authentication endpoint.
	AuthenticationEndpoint *string `json:"authentication_endpoint,omitempty"`

	// CannotRenewAfter The time after which the system assigned client_secret cannot be used to call client_secret_url for a refreshed credential in the formate 2017-03-01T14:11:00Z.
	CannotRenewAfter *string `json:"cannot_renew_after,omitempty"`

	// ClientId The AAD client id for the system assigned identity.
	ClientId *string `json:"client_id,omitempty"`

	// ClientSecret The base64 encoded private key X509 certificate for the system assigned identity, encrypted via AES256+SHA256.
	ClientSecret *string `json:"client_secret,omitempty"`

	// ClientSecretUrl A refreshed version of the URL used to retrieve credentials for the system assigned identity.
	ClientSecretUrl *string `json:"client_secret_url,omitempty"`

	// CustomClaims The custom claims to include into X509 Certificate
	CustomClaims *CustomClaims `json:"custom_claims,omitempty"`

	// DelegatedResources The delegated resources' credentials requested by the caller.
	DelegatedResources *[]DelegatedResource `json:"delegated_resources,omitempty"`

	// DelegationUrl URL to perform RP-to-RP delegation for non-ARM resources, requiring manual onboarding via MIRP team.
	DelegationUrl *string `json:"delegation_url,omitempty"`

	// ExplicitIdentities The user assigned identities requested by the caller. This array will be empty for system assigned credential only requests.
	ExplicitIdentities *[]UserAssignedIdentityCredentials `json:"explicit_identities,omitempty"`

	// InternalId An internal identifier for the resource in managed identity RP.
	InternalId *string `json:"internal_id,omitempty"`

	// MtlsAuthenticationEndpoint The AAD mTLS authentication endpoint for the system assigned identity. You can make a token request with a short-lived credential toward this authentication endpoint.
	MtlsAuthenticationEndpoint *string `json:"mtls_authentication_endpoint,omitempty"`

	// NotAfter The time at which the system assigned credential becomes invalid for retireving AAD tokens in the format 2017-03-01T14:11:00Z.
	NotAfter *string `json:"not_after,omitempty"`

	// NotBefore The time at which the system assigned credential becomes valid for retireving AAD tokens in the format 2017-03-01T14:11:00Z.
	NotBefore *string `json:"not_before,omitempty"`

	// ObjectId The AAD object id for the system assigned identity.
	ObjectId *string `json:"object_id,omitempty"`

	// RenewAfter The time after which a call to the system assigned client_secret_url will return a new credential in the format 2017-03-01T14:11:00Z.
	RenewAfter *string `json:"renew_after,omitempty"`

	// TenantId The AAD tenant id for the system assigned identity.
	TenantId *string `json:"tenant_id,omitempty"`
}

ManagedIdentityCredentials A system assigned managed identity + user assigned managed identity array.

type MoveIdentityResponse

type MoveIdentityResponse struct {
	// IdentityUrl the new identity url of the resource.
	IdentityUrl *string `json:"identityUrl,omitempty"`
}

MoveIdentityResponse defines model for MoveIdentityResponse.

type MoveRequestBodyDefinition

type MoveRequestBodyDefinition struct {
	// TargetResourceId New Resource Id of the resource that will be moved to.
	TargetResourceId *string `json:"targetResourceId,omitempty"`
}

MoveRequestBodyDefinition defines model for MoveRequestBodyDefinition.

type MoveidentityJSONRequestBody

type MoveidentityJSONRequestBody = MoveRequestBodyDefinition

MoveidentityJSONRequestBody defines body for Moveidentity for application/json ContentType.

type MoveidentityParams

type MoveidentityParams struct {
	// ApiVersion The api version to use in the call. The caller must add this, it isn't included in the x-ms-identity-url header from ARM.
	ApiVersion MoveidentityParamsApiVersion `form:"api-version" json:"api-version"`
}

MoveidentityParams defines parameters for Moveidentity.

type MoveidentityParamsApiVersion

type MoveidentityParamsApiVersion string

MoveidentityParamsApiVersion defines parameters for Moveidentity.

const (
	MoveidentityParamsApiVersionN20240101T000000Z MoveidentityParamsApiVersion = "2024-01-01T00:00:00Z"
)

Defines values for MoveidentityParamsApiVersion.

type MoveidentityResponse

type MoveidentityResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MoveIdentityResponse
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON404      *ErrorResponse
	JSON405      *ErrorResponse
	JSON429      *ErrorResponse
	JSON500      *ErrorResponse
	JSON503      *ErrorResponse
}

func ParseMoveidentityResponse

func ParseMoveidentityResponse(rsp *http.Response) (*MoveidentityResponse, error)

ParseMoveidentityResponse parses an HTTP response from a MoveidentityWithResponse call

func (MoveidentityResponse) Status

func (r MoveidentityResponse) Status() string

Status returns HTTPResponse.Status

func (MoveidentityResponse) StatusCode

func (r MoveidentityResponse) 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 UserAssignedIdentityCredentials

type UserAssignedIdentityCredentials struct {
	// AuthenticationEndpoint The AAD authentication endpoint for the user assigned identity. You can make token request toward this authentication endpoint.
	AuthenticationEndpoint *string `json:"authentication_endpoint,omitempty"`

	// CannotRenewAfter The time after which the user assigned client_secret cannot be used to call client_secret_url for a refreshed credential in the formate 2017-03-01T14:11:00Z.
	CannotRenewAfter *string `json:"cannot_renew_after,omitempty"`

	// ClientId The AAD client id for the user assigned identity.
	ClientId *string `json:"client_id,omitempty"`

	// ClientSecret The base64 encoded private key X509 certificate for the user assigned identity, encrypted via AES256+SHA256.
	ClientSecret *string `json:"client_secret,omitempty"`

	// ClientSecretUrl A refreshed version of the URL used to retrieve credentials for the user assigned identity.
	ClientSecretUrl *string `json:"client_secret_url,omitempty"`

	// CustomClaims The custom claims to include into X509 Certificate
	CustomClaims *CustomClaims `json:"custom_claims,omitempty"`

	// MtlsAuthenticationEndpoint The AAD mTLS authentication endpoint for the system assigned identity. You can make a token request with a short-lived credential toward this authentication endpoint.
	MtlsAuthenticationEndpoint *string `json:"mtls_authentication_endpoint,omitempty"`

	// NotAfter The time at which the user assigned credential becomes invalid for retireving AAD tokens in the format 2017-03-01T14:11:00Z.
	NotAfter *string `json:"not_after,omitempty"`

	// NotBefore The time at which the user assigned credential becomes valid for retireving AAD tokens in the format 2017-03-01T14:11:00Z.
	NotBefore *string `json:"not_before,omitempty"`

	// ObjectId The AAD object id for the user assigned identity.
	ObjectId *string `json:"object_id,omitempty"`

	// RenewAfter The time after which a call to the user assigned client_secret_url will return a new credential in the format 2017-03-01T14:11:00Z.
	RenewAfter *string `json:"renew_after,omitempty"`

	// ResourceId The ARM resource id for the user assigned identity.
	ResourceId *string `json:"resource_id,omitempty"`

	// TenantId The AAD tenant id for the user assigned identity.
	TenantId *string `json:"tenant_id,omitempty"`
}

UserAssignedIdentityCredentials A managed identity credentials object.

Jump to

Keyboard shortcuts

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