get_current_org

package
v0.0.0-...-4958bdd Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for get current org API

func (*Client) GetCurrentOrgQuota

func (a *Client) GetCurrentOrgQuota(opts ...ClientOption) (*GetCurrentOrgQuotaOK, error)

GetCurrentOrgQuota fetches organization quota

If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).

func (*Client) GetCurrentOrgQuotaWithParams

func (a *Client) GetCurrentOrgQuotaWithParams(params *GetCurrentOrgQuotaParams, opts ...ClientOption) (*GetCurrentOrgQuotaOK, error)

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

func WithAuthInfo

func WithAuthInfo(authInfo runtime.ClientAuthInfoWriter) ClientOption

WithAuthInfo changes the transport on the client

type ClientService

type ClientService interface {
	GetCurrentOrgQuota(opts ...ClientOption) (*GetCurrentOrgQuotaOK, error)
	GetCurrentOrgQuotaWithParams(params *GetCurrentOrgQuotaParams, opts ...ClientOption) (*GetCurrentOrgQuotaOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new get current org API client.

type GetCurrentOrgQuotaForbidden

type GetCurrentOrgQuotaForbidden struct {
	Payload *models.ErrorResponseBody
}

GetCurrentOrgQuotaForbidden describes a response with status code 403, with default header values.

ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.

func NewGetCurrentOrgQuotaForbidden

func NewGetCurrentOrgQuotaForbidden() *GetCurrentOrgQuotaForbidden

NewGetCurrentOrgQuotaForbidden creates a GetCurrentOrgQuotaForbidden with default headers values

func (*GetCurrentOrgQuotaForbidden) Code

func (o *GetCurrentOrgQuotaForbidden) Code() int

Code gets the status code for the get current org quota forbidden response

func (*GetCurrentOrgQuotaForbidden) Error

func (*GetCurrentOrgQuotaForbidden) GetPayload

func (*GetCurrentOrgQuotaForbidden) IsClientError

func (o *GetCurrentOrgQuotaForbidden) IsClientError() bool

IsClientError returns true when this get current org quota forbidden response has a 4xx status code

func (*GetCurrentOrgQuotaForbidden) IsCode

func (o *GetCurrentOrgQuotaForbidden) IsCode(code int) bool

IsCode returns true when this get current org quota forbidden response a status code equal to that given

func (*GetCurrentOrgQuotaForbidden) IsRedirect

func (o *GetCurrentOrgQuotaForbidden) IsRedirect() bool

IsRedirect returns true when this get current org quota forbidden response has a 3xx status code

func (*GetCurrentOrgQuotaForbidden) IsServerError

func (o *GetCurrentOrgQuotaForbidden) IsServerError() bool

IsServerError returns true when this get current org quota forbidden response has a 5xx status code

func (*GetCurrentOrgQuotaForbidden) IsSuccess

func (o *GetCurrentOrgQuotaForbidden) IsSuccess() bool

IsSuccess returns true when this get current org quota forbidden response has a 2xx status code

func (*GetCurrentOrgQuotaForbidden) String

func (o *GetCurrentOrgQuotaForbidden) String() string

type GetCurrentOrgQuotaInternalServerError

type GetCurrentOrgQuotaInternalServerError struct {
	Payload *models.ErrorResponseBody
}

GetCurrentOrgQuotaInternalServerError describes a response with status code 500, with default header values.

InternalServerError is a general error indicating something went wrong internally.

func NewGetCurrentOrgQuotaInternalServerError

func NewGetCurrentOrgQuotaInternalServerError() *GetCurrentOrgQuotaInternalServerError

NewGetCurrentOrgQuotaInternalServerError creates a GetCurrentOrgQuotaInternalServerError with default headers values

func (*GetCurrentOrgQuotaInternalServerError) Code

Code gets the status code for the get current org quota internal server error response

func (*GetCurrentOrgQuotaInternalServerError) Error

func (*GetCurrentOrgQuotaInternalServerError) GetPayload

func (*GetCurrentOrgQuotaInternalServerError) IsClientError

func (o *GetCurrentOrgQuotaInternalServerError) IsClientError() bool

IsClientError returns true when this get current org quota internal server error response has a 4xx status code

func (*GetCurrentOrgQuotaInternalServerError) IsCode

IsCode returns true when this get current org quota internal server error response a status code equal to that given

func (*GetCurrentOrgQuotaInternalServerError) IsRedirect

IsRedirect returns true when this get current org quota internal server error response has a 3xx status code

func (*GetCurrentOrgQuotaInternalServerError) IsServerError

func (o *GetCurrentOrgQuotaInternalServerError) IsServerError() bool

IsServerError returns true when this get current org quota internal server error response has a 5xx status code

func (*GetCurrentOrgQuotaInternalServerError) IsSuccess

IsSuccess returns true when this get current org quota internal server error response has a 2xx status code

func (*GetCurrentOrgQuotaInternalServerError) String

type GetCurrentOrgQuotaNotFound

type GetCurrentOrgQuotaNotFound struct {
	Payload *models.ErrorResponseBody
}

GetCurrentOrgQuotaNotFound describes a response with status code 404, with default header values.

NotFoundError is returned when the requested resource was not found.

func NewGetCurrentOrgQuotaNotFound

func NewGetCurrentOrgQuotaNotFound() *GetCurrentOrgQuotaNotFound

NewGetCurrentOrgQuotaNotFound creates a GetCurrentOrgQuotaNotFound with default headers values

func (*GetCurrentOrgQuotaNotFound) Code

func (o *GetCurrentOrgQuotaNotFound) Code() int

Code gets the status code for the get current org quota not found response

func (*GetCurrentOrgQuotaNotFound) Error

func (*GetCurrentOrgQuotaNotFound) GetPayload

func (*GetCurrentOrgQuotaNotFound) IsClientError

func (o *GetCurrentOrgQuotaNotFound) IsClientError() bool

IsClientError returns true when this get current org quota not found response has a 4xx status code

func (*GetCurrentOrgQuotaNotFound) IsCode

func (o *GetCurrentOrgQuotaNotFound) IsCode(code int) bool

IsCode returns true when this get current org quota not found response a status code equal to that given

func (*GetCurrentOrgQuotaNotFound) IsRedirect

func (o *GetCurrentOrgQuotaNotFound) IsRedirect() bool

IsRedirect returns true when this get current org quota not found response has a 3xx status code

func (*GetCurrentOrgQuotaNotFound) IsServerError

func (o *GetCurrentOrgQuotaNotFound) IsServerError() bool

IsServerError returns true when this get current org quota not found response has a 5xx status code

func (*GetCurrentOrgQuotaNotFound) IsSuccess

func (o *GetCurrentOrgQuotaNotFound) IsSuccess() bool

IsSuccess returns true when this get current org quota not found response has a 2xx status code

func (*GetCurrentOrgQuotaNotFound) String

func (o *GetCurrentOrgQuotaNotFound) String() string

type GetCurrentOrgQuotaOK

type GetCurrentOrgQuotaOK struct {
	Payload []*models.QuotaDTO
}

GetCurrentOrgQuotaOK describes a response with status code 200, with default header values.

(empty)

func NewGetCurrentOrgQuotaOK

func NewGetCurrentOrgQuotaOK() *GetCurrentOrgQuotaOK

NewGetCurrentOrgQuotaOK creates a GetCurrentOrgQuotaOK with default headers values

func (*GetCurrentOrgQuotaOK) Code

func (o *GetCurrentOrgQuotaOK) Code() int

Code gets the status code for the get current org quota Ok response

func (*GetCurrentOrgQuotaOK) Error

func (o *GetCurrentOrgQuotaOK) Error() string

func (*GetCurrentOrgQuotaOK) GetPayload

func (o *GetCurrentOrgQuotaOK) GetPayload() []*models.QuotaDTO

func (*GetCurrentOrgQuotaOK) IsClientError

func (o *GetCurrentOrgQuotaOK) IsClientError() bool

IsClientError returns true when this get current org quota Ok response has a 4xx status code

func (*GetCurrentOrgQuotaOK) IsCode

func (o *GetCurrentOrgQuotaOK) IsCode(code int) bool

IsCode returns true when this get current org quota Ok response a status code equal to that given

func (*GetCurrentOrgQuotaOK) IsRedirect

func (o *GetCurrentOrgQuotaOK) IsRedirect() bool

IsRedirect returns true when this get current org quota Ok response has a 3xx status code

func (*GetCurrentOrgQuotaOK) IsServerError

func (o *GetCurrentOrgQuotaOK) IsServerError() bool

IsServerError returns true when this get current org quota Ok response has a 5xx status code

func (*GetCurrentOrgQuotaOK) IsSuccess

func (o *GetCurrentOrgQuotaOK) IsSuccess() bool

IsSuccess returns true when this get current org quota Ok response has a 2xx status code

func (*GetCurrentOrgQuotaOK) String

func (o *GetCurrentOrgQuotaOK) String() string

type GetCurrentOrgQuotaParams

type GetCurrentOrgQuotaParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetCurrentOrgQuotaParams contains all the parameters to send to the API endpoint

for the get current org quota operation.

Typically these are written to a http.Request.

func NewGetCurrentOrgQuotaParams

func NewGetCurrentOrgQuotaParams() *GetCurrentOrgQuotaParams

NewGetCurrentOrgQuotaParams creates a new GetCurrentOrgQuotaParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetCurrentOrgQuotaParamsWithContext

func NewGetCurrentOrgQuotaParamsWithContext(ctx context.Context) *GetCurrentOrgQuotaParams

NewGetCurrentOrgQuotaParamsWithContext creates a new GetCurrentOrgQuotaParams object with the ability to set a context for a request.

func NewGetCurrentOrgQuotaParamsWithHTTPClient

func NewGetCurrentOrgQuotaParamsWithHTTPClient(client *http.Client) *GetCurrentOrgQuotaParams

NewGetCurrentOrgQuotaParamsWithHTTPClient creates a new GetCurrentOrgQuotaParams object with the ability to set a custom HTTPClient for a request.

func NewGetCurrentOrgQuotaParamsWithTimeout

func NewGetCurrentOrgQuotaParamsWithTimeout(timeout time.Duration) *GetCurrentOrgQuotaParams

NewGetCurrentOrgQuotaParamsWithTimeout creates a new GetCurrentOrgQuotaParams object with the ability to set a timeout on a request.

func (*GetCurrentOrgQuotaParams) SetContext

func (o *GetCurrentOrgQuotaParams) SetContext(ctx context.Context)

SetContext adds the context to the get current org quota params

func (*GetCurrentOrgQuotaParams) SetDefaults

func (o *GetCurrentOrgQuotaParams) SetDefaults()

SetDefaults hydrates default values in the get current org quota params (not the query body).

All values with no default are reset to their zero value.

func (*GetCurrentOrgQuotaParams) SetHTTPClient

func (o *GetCurrentOrgQuotaParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get current org quota params

func (*GetCurrentOrgQuotaParams) SetTimeout

func (o *GetCurrentOrgQuotaParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get current org quota params

func (*GetCurrentOrgQuotaParams) WithContext

WithContext adds the context to the get current org quota params

func (*GetCurrentOrgQuotaParams) WithDefaults

WithDefaults hydrates default values in the get current org quota params (not the query body).

All values with no default are reset to their zero value.

func (*GetCurrentOrgQuotaParams) WithHTTPClient

func (o *GetCurrentOrgQuotaParams) WithHTTPClient(client *http.Client) *GetCurrentOrgQuotaParams

WithHTTPClient adds the HTTPClient to the get current org quota params

func (*GetCurrentOrgQuotaParams) WithTimeout

WithTimeout adds the timeout to the get current org quota params

func (*GetCurrentOrgQuotaParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetCurrentOrgQuotaReader

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

GetCurrentOrgQuotaReader is a Reader for the GetCurrentOrgQuota structure.

func (*GetCurrentOrgQuotaReader) ReadResponse

func (o *GetCurrentOrgQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetCurrentOrgQuotaUnauthorized

type GetCurrentOrgQuotaUnauthorized struct {
	Payload *models.ErrorResponseBody
}

GetCurrentOrgQuotaUnauthorized describes a response with status code 401, with default header values.

UnauthorizedError is returned when the request is not authenticated.

func NewGetCurrentOrgQuotaUnauthorized

func NewGetCurrentOrgQuotaUnauthorized() *GetCurrentOrgQuotaUnauthorized

NewGetCurrentOrgQuotaUnauthorized creates a GetCurrentOrgQuotaUnauthorized with default headers values

func (*GetCurrentOrgQuotaUnauthorized) Code

Code gets the status code for the get current org quota unauthorized response

func (*GetCurrentOrgQuotaUnauthorized) Error

func (*GetCurrentOrgQuotaUnauthorized) GetPayload

func (*GetCurrentOrgQuotaUnauthorized) IsClientError

func (o *GetCurrentOrgQuotaUnauthorized) IsClientError() bool

IsClientError returns true when this get current org quota unauthorized response has a 4xx status code

func (*GetCurrentOrgQuotaUnauthorized) IsCode

func (o *GetCurrentOrgQuotaUnauthorized) IsCode(code int) bool

IsCode returns true when this get current org quota unauthorized response a status code equal to that given

func (*GetCurrentOrgQuotaUnauthorized) IsRedirect

func (o *GetCurrentOrgQuotaUnauthorized) IsRedirect() bool

IsRedirect returns true when this get current org quota unauthorized response has a 3xx status code

func (*GetCurrentOrgQuotaUnauthorized) IsServerError

func (o *GetCurrentOrgQuotaUnauthorized) IsServerError() bool

IsServerError returns true when this get current org quota unauthorized response has a 5xx status code

func (*GetCurrentOrgQuotaUnauthorized) IsSuccess

func (o *GetCurrentOrgQuotaUnauthorized) IsSuccess() bool

IsSuccess returns true when this get current org quota unauthorized response has a 2xx status code

func (*GetCurrentOrgQuotaUnauthorized) String

Jump to

Keyboard shortcuts

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