private

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

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

Code generated by github.com/do87/oapi-codegen version v0.5.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostOrganizationsRequest

func NewPostOrganizationsRequest(ctx context.Context, server string, body PostOrganizationsJSONRequestBody) (*http.Request, error)

NewPostOrganizationsRequest calls the generic PostOrganizations builder with application/json body

func NewPostOrganizationsRequestWithBody

func NewPostOrganizationsRequestWithBody(ctx context.Context, server string, contentType string, body io.Reader) (*http.Request, error)

NewPostOrganizationsRequestWithBody generates requests for PostOrganizations 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 common.Client
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, httpClient common.Client) *Client

Creates a new Client, with reasonable defaults

func (*Client) PostOrganizations

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

func (*Client) PostOrganizationsWithBody

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

type ClientInterface

type ClientInterface interface {
	// PostOrganizations request with any body
	PostOrganizationsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostOrganizations(ctx context.Context, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, httpClient common.Client) *ClientWithResponses

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

func (*ClientWithResponses) ParsePostOrganizationsResponse

func (c *ClientWithResponses) ParsePostOrganizationsResponse(rsp *http.Response) (*PostOrganizationsResponse, error)

ParsePostOrganizationsResponse parses an HTTP response from a PostOrganizationsWithResponse call

func (*ClientWithResponses) PostOrganizationsWithBodyWithResponse

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

PostOrganizationsWithBodyWithResponse request with arbitrary body returning *PostOrganizationsResponse

func (*ClientWithResponses) PostOrganizationsWithResponse

func (c *ClientWithResponses) PostOrganizationsWithResponse(ctx context.Context, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostOrganizations request with any body
	PostOrganizationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error)

	PostOrganizationsWithResponse(ctx context.Context, body PostOrganizationsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationsResponse, error)
}

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

type ErrorResponse

type ErrorResponse struct {
	// Error The reason phrase of the status code.
	Error string `json:"error"`

	// Message Description of the error.
	Message string `json:"message"`

	// Path Path which was called.
	Path string `json:"path"`

	// Status Http Status Code.
	Status float32 `json:"status"`

	// TimeStamp Timestamp at which the error occurred.
	TimeStamp string `json:"timeStamp"`
}

ErrorResponse defines model for ErrorResponse.

type LifecycleState

type LifecycleState string

LifecycleState Lifecycle state of the resource container.

| LIFECYCLE STATE | DESCRIPTION | |----------|--------------------| | CREATING | The creation process has been triggered. The state remains until resource manager gets notified about successful process completion. | | ACTIVE | Resource container can be fully used. | | INACTIVE | Resource container usage has been disabled. | | DELETING | The deletion process has been triggered. The state remains until resource manager gets notified about successful process completion. Afterwards, the record will be deleted. |

const (
	ACTIVE   LifecycleState = "ACTIVE"
	CREATING LifecycleState = "CREATING"
	DELETING LifecycleState = "DELETING"
	INACTIVE LifecycleState = "INACTIVE"
)

Defines values for LifecycleState.

type OrganizationMember

type OrganizationMember struct {
	// Role Unique name of the role.
	Role OrganizationMemberRole `json:"role"`

	// Subject Unique identifier of the user, service account, or client.
	Subject string `json:"subject"`
}

OrganizationMember defines model for OrganizationMember.

type OrganizationMemberRole

type OrganizationMemberRole string

OrganizationMemberRole Unique name of the role.

const (
	ORGANIZATION_ADMIN   OrganizationMemberRole = "organization.admin"
	ORGANIZATION_AUDITOR OrganizationMemberRole = "organization.auditor"
	ORGANIZATION_MEMBER  OrganizationMemberRole = "organization.member"
	ORGANIZATION_OWNER   OrganizationMemberRole = "organization.owner"
)

Defines values for OrganizationMemberRole.

type OrganizationRequestBody

type OrganizationRequestBody struct {
	// Labels Labels are key-value string pairs which can be attached to a resource container. Some labels may be enforced via policies.
	// - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`.
	// - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`.
	Labels *ResourceLabels `json:"labels,omitempty"`

	// Members The initial members that are assigned to the organization. At least one subject needs to be a user and not a client or service account.
	Members []OrganizationMember `json:"members"`

	// Name The name for the organization matching the regex `^[a-zA-ZäüöÄÜÖ0-9][ a-zA-ZäüöÄÜÖß0-9_+&-]{1,39}$`.
	Name string `json:"name"`
}

OrganizationRequestBody defines model for OrganizationRequestBody.

type OrganizationResponse

type OrganizationResponse struct {
	// ContainerId Globally unique, user-friendly identifier. Will replace old, legacy identifier "organizationId".
	ContainerID string `json:"containerId"`

	// CreationTime Timestamp at which the organization was created.
	CreationTime string `json:"creationTime"`

	// Labels Labels are key-value string pairs which can be attached to a resource container. Some labels may be enforced via policies.
	// - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`.
	// - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`.
	Labels *ResourceLabels `json:"labels,omitempty"`

	// LifecycleState Lifecycle state of the resource container.
	//
	// | LIFECYCLE STATE | DESCRIPTION |
	// |----------|--------------------|
	// | CREATING | The creation process has been triggered. The state remains until resource manager gets notified about successful process completion. |
	// | ACTIVE   | Resource container can be fully used. |
	// | INACTIVE | Resource container usage has been disabled. |
	// | DELETING | The deletion process has been triggered. The state remains until resource manager gets notified about successful process completion. Afterwards, the record will be deleted. |
	LifecycleState LifecycleState `json:"lifecycleState"`

	// Name Organization name.
	Name string `json:"name"`

	// OrganizationId Globally unique, legacy organization identifier (for backward compatibility)
	OrganizationID openapi_types.UUID `json:"organizationId"`

	// UpdateTime Timestamp at which the organization was last modified.
	UpdateTime string `json:"updateTime"`
}

OrganizationResponse defines model for OrganizationResponse.

type PostOrganizationsJSONRequestBody

type PostOrganizationsJSONRequestBody = OrganizationRequestBody

PostOrganizationsJSONRequestBody defines body for PostOrganizations for application/json ContentType.

type PostOrganizationsResponse

type PostOrganizationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *OrganizationResponse
	JSON400      *ErrorResponse
	JSON409      *ErrorResponse
	HasError     error // Aggregated error
}

func (PostOrganizationsResponse) Status

func (r PostOrganizationsResponse) Status() string

Status returns HTTPResponse.Status

func (PostOrganizationsResponse) StatusCode

func (r PostOrganizationsResponse) 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 ResourceLabels

type ResourceLabels map[string]string

ResourceLabels Labels are key-value string pairs which can be attached to a resource container. Some labels may be enforced via policies. - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`.

Jump to

Keyboard shortcuts

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