serviceenablement

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

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

Code generated by github.com/do87/stackit-client-generator version v0.0.2 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var BaseURLs = baseurl.New(
	"kubernetes",
	"https://service-enablement.api.eu01.stackit.cloud/",
)

Functions

func NewDisableServiceRequest

func NewDisableServiceRequest(ctx context.Context, server string, projectId string, serviceId string) (*http.Request, error)

NewDisableServiceRequest generates requests for DisableService

func NewEnableServiceRequest

func NewEnableServiceRequest(ctx context.Context, server string, projectId string, serviceId string) (*http.Request, error)

NewEnableServiceRequest generates requests for EnableService

func NewGetServiceRequest

func NewGetServiceRequest(ctx context.Context, server string, projectId string, serviceId string) (*http.Request, error)

NewGetServiceRequest generates requests for GetService

func NewListServicesRequest

func NewListServicesRequest(ctx context.Context, server string, projectId string, params *ListServicesParams) (*http.Request, error)

NewListServicesRequest generates requests for ListServices

Types

type ActionError

type ActionError struct {
	// Action the last action which was triggered on this service
	Action *ActionErrorAction `json:"action,omitempty"`

	// Code the error code if provided by the service
	Code *string `json:"code,omitempty"`

	// Reason the error reason provided by the service
	Reason *string `json:"reason,omitempty"`
}

ActionError the last error for this service.

type ActionErrorAction

type ActionErrorAction string

ActionErrorAction the last action which was triggered on this service

const (
	DISABLE ActionErrorAction = "DISABLE"
	ENABLE  ActionErrorAction = "ENABLE"
)

Defines values for ActionErrorAction.

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 contracts.BaseClientInterface
}

Client which conforms to the OpenAPI3 specification for this service.

func NewRawClient

func NewRawClient(server string, httpClient contracts.BaseClientInterface) *Client

NewRawClient Creates a new Client, with reasonable defaults

func (*Client) DisableServiceRaw

func (c *Client) DisableServiceRaw(ctx context.Context, projectId string, serviceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EnableServiceRaw

func (c *Client) EnableServiceRaw(ctx context.Context, projectId string, serviceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetServiceRaw

func (c *Client) GetServiceRaw(ctx context.Context, projectId string, serviceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListServicesRaw

func (c *Client) ListServicesRaw(ctx context.Context, projectId string, params *ListServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientWithResponses

type ClientWithResponses struct {
	// contains filtered or unexported fields
}

ClientWithResponses builds on rawClientInterface to offer response payloads

func NewClient

func NewClient(server string, httpClient contracts.BaseClientInterface) *ClientWithResponses

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

func (*ClientWithResponses) DisableService

func (c *ClientWithResponses) DisableService(ctx context.Context, projectId string, serviceId string, reqEditors ...RequestEditorFn) (*DisableServiceResponse, error)

DisableService request returning *DisableServiceResponse

func (*ClientWithResponses) EnableService

func (c *ClientWithResponses) EnableService(ctx context.Context, projectId string, serviceId string, reqEditors ...RequestEditorFn) (*EnableServiceResponse, error)

EnableService request returning *EnableServiceResponse

func (*ClientWithResponses) GetService

func (c *ClientWithResponses) GetService(ctx context.Context, projectId string, serviceId string, reqEditors ...RequestEditorFn) (*GetServiceResponse, error)

GetService request returning *GetServiceResponse

func (*ClientWithResponses) ListServices

func (c *ClientWithResponses) ListServices(ctx context.Context, projectId string, params *ListServicesParams, reqEditors ...RequestEditorFn) (*ListServicesResponse, error)

ListServices request returning *ListServicesResponse

func (*ClientWithResponses) ParseDisableServiceResponse

func (c *ClientWithResponses) ParseDisableServiceResponse(rsp *http.Response) (*DisableServiceResponse, error)

ParseDisableServiceResponse parses an HTTP response from a DisableService call

func (*ClientWithResponses) ParseEnableServiceResponse

func (c *ClientWithResponses) ParseEnableServiceResponse(rsp *http.Response) (*EnableServiceResponse, error)

ParseEnableServiceResponse parses an HTTP response from a EnableService call

func (*ClientWithResponses) ParseGetServiceResponse

func (c *ClientWithResponses) ParseGetServiceResponse(rsp *http.Response) (*GetServiceResponse, error)

ParseGetServiceResponse parses an HTTP response from a GetService call

func (*ClientWithResponses) ParseListServicesResponse

func (c *ClientWithResponses) ParseListServicesResponse(rsp *http.Response) (*ListServicesResponse, error)

ParseListServicesResponse parses an HTTP response from a ListServices call

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListServices request
	ListServices(ctx context.Context, projectId string, params *ListServicesParams, reqEditors ...RequestEditorFn) (*ListServicesResponse, error)

	// DisableService request
	DisableService(ctx context.Context, projectId string, serviceId string, reqEditors ...RequestEditorFn) (*DisableServiceResponse, error)

	// GetService request
	GetService(ctx context.Context, projectId string, serviceId string, reqEditors ...RequestEditorFn) (*GetServiceResponse, error)

	// EnableService request
	EnableService(ctx context.Context, projectId string, serviceId string, reqEditors ...RequestEditorFn) (*EnableServiceResponse, error)
}

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

type Dependencies

type Dependencies struct {
	// Hard a list of service IDs which this service depend on. If the service is enabled, those service are enabled as well automatically.
	Hard *[]ServiceID `json:"hard,omitempty"`

	// Soft a list of service IDs which this service depend on. When they are disabled a notification is sent.
	Soft *[]ServiceID `json:"soft,omitempty"`
}

Dependencies defines model for Dependencies.

type DisableServiceResponse

type DisableServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (DisableServiceResponse) Status

func (r DisableServiceResponse) Status() string

Status returns HTTPResponse.Status

func (DisableServiceResponse) StatusCode

func (r DisableServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EnableServiceResponse

type EnableServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (EnableServiceResponse) Status

func (r EnableServiceResponse) Status() string

Status returns HTTPResponse.Status

func (EnableServiceResponse) StatusCode

func (r EnableServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

func (*EnableServiceResponse) WaitHandler added in v1.30.1

func (*EnableServiceResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, serviceID string) *wait.Handler

type GetServiceResponse

type GetServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ProjectCloudService
}

func (GetServiceResponse) Status

func (r GetServiceResponse) Status() string

Status returns HTTPResponse.Status

func (GetServiceResponse) StatusCode

func (r GetServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListServicesParams

type ListServicesParams struct {
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
}

ListServicesParams defines parameters for ListServices.

type ListServicesResponse

type ListServicesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Items      *[]ProjectCloudService `json:"items,omitempty"`
		NextCursor *string                `json:"nextCursor,omitempty"`
	}
}

func (ListServicesResponse) Status

func (r ListServicesResponse) Status() string

Status returns HTTPResponse.Status

func (ListServicesResponse) StatusCode

func (r ListServicesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Parameters

type Parameters struct {
	General *struct {
		OrganizationID *string                        `json:"organizationId,omitempty"`
		ProjectName    *string                        `json:"projectName,omitempty"`
		ProjectScope   *ParametersGeneralProjectScope `json:"projectScope,omitempty"`
	} `json:"general,omitempty"`
	AdditionalProperties map[string]map[string]string `json:"-"`
}

Parameters service parameters

func (Parameters) Get

func (a Parameters) Get(fieldName string) (value map[string]string, found bool)

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

func (Parameters) MarshalJSON

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

Override default JSON handling for Parameters to handle AdditionalProperties

func (*Parameters) Set

func (a *Parameters) Set(fieldName string, value map[string]string)

Setter for additional properties for Parameters

func (*Parameters) UnmarshalJSON

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

Override default JSON handling for Parameters to handle AdditionalProperties

type ParametersGeneralProjectScope

type ParametersGeneralProjectScope string

ParametersGeneralProjectScope defines model for Parameters.General.ProjectScope.

const (
	PARAMETERS_GENERAL_PROJECT_SCOPE_PUBLIC  ParametersGeneralProjectScope = "PUBLIC"
	PARAMETERS_GENERAL_PROJECT_SCOPE_SCHWARZ ParametersGeneralProjectScope = "SCHWARZ"
)

Defines values for ParametersGeneralProjectScope.

type ProjectCloudService

type ProjectCloudService struct {
	Dependencies *Dependencies                  `json:"dependencies,omitempty"`
	Enablement   *ProjectCloudServiceEnablement `json:"enablement,omitempty"`

	// Error the last error for this service.
	Error     *ActionError                  `json:"error,omitempty"`
	Labels    *map[string]string            `json:"labels,omitempty"`
	Lifecycle *ProjectCloudServiceLifecycle `json:"lifecycle,omitempty"`

	// Parameters service parameters
	Parameters *Parameters               `json:"parameters,omitempty"`
	Scope      *ProjectCloudServiceScope `json:"scope,omitempty"`

	// ServiceId the id of the service
	ServiceID *ServiceID `json:"serviceId,omitempty"`

	// State the state of a service within a project
	State *ProjectCloudServiceState `json:"state,omitempty"`
}

ProjectCloudService defines model for ProjectCloudService.

type ProjectCloudServiceEnablement

type ProjectCloudServiceEnablement string

ProjectCloudServiceEnablement defines model for ProjectCloudService.Enablement.

const (
	AUTO    ProjectCloudServiceEnablement = "AUTO"
	REQUEST ProjectCloudServiceEnablement = "REQUEST"
)

Defines values for ProjectCloudServiceEnablement.

type ProjectCloudServiceLifecycle

type ProjectCloudServiceLifecycle string

ProjectCloudServiceLifecycle defines model for ProjectCloudService.Lifecycle.

const (
	FLEX    ProjectCloudServiceLifecycle = "FLEX"
	PROJECT ProjectCloudServiceLifecycle = "PROJECT"
)

Defines values for ProjectCloudServiceLifecycle.

type ProjectCloudServiceScope

type ProjectCloudServiceScope string

ProjectCloudServiceScope defines model for ProjectCloudService.Scope.

const (
	PROJECT_CLOUD_SERVICE_SCOPE_PRIVATE ProjectCloudServiceScope = "PRIVATE"
	PROJECT_CLOUD_SERVICE_SCOPE_PUBLIC  ProjectCloudServiceScope = "PUBLIC"
)

Defines values for ProjectCloudServiceScope.

type ProjectCloudServiceState

type ProjectCloudServiceState string

ProjectCloudServiceState the state of a service within a project

const (
	DISABLED  ProjectCloudServiceState = "DISABLED"
	DISABLING ProjectCloudServiceState = "DISABLING"
	ENABLED   ProjectCloudServiceState = "ENABLED"
	ENABLING  ProjectCloudServiceState = "ENABLING"
)

Defines values for ProjectCloudServiceState.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type ServiceID

type ServiceID = string

ServiceID the id of the service

Jump to

Keyboard shortcuts

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