Documentation
¶
Overview ¶
Package mnq provides methods and message types of the mnq v1alpha1 API.
Index ¶
- Constants
- type API
- func (s *API) CreateCredential(req *CreateCredentialRequest, opts ...scw.RequestOption) (*Credential, error)
- func (s *API) CreateNamespace(req *CreateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
- func (s *API) DeleteCredential(req *DeleteCredentialRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteNamespace(req *DeleteNamespaceRequest, opts ...scw.RequestOption) error
- func (s *API) GetCredential(req *GetCredentialRequest, opts ...scw.RequestOption) (*Credential, error)
- func (s *API) GetNamespace(req *GetNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
- func (s *API) ListCredentials(req *ListCredentialsRequest, opts ...scw.RequestOption) (*ListCredentialsResponse, error)
- func (s *API) ListNamespaces(req *ListNamespacesRequest, opts ...scw.RequestOption) (*ListNamespacesResponse, error)
- func (s *API) Regions() []scw.Region
- func (s *API) UpdateCredential(req *UpdateCredentialRequest, opts ...scw.RequestOption) (*Credential, error)
- func (s *API) UpdateNamespace(req *UpdateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
- type CreateCredentialRequest
- type CreateNamespaceRequest
- type Credential
- type CredentialNATSCredsFile
- type CredentialSQSSNSCreds
- type CredentialSummary
- type CredentialSummarySQSSNSCreds
- type DeleteCredentialRequest
- type DeleteNamespaceRequest
- type GetCredentialRequest
- type GetNamespaceRequest
- type ListCredentialsRequest
- type ListCredentialsRequestOrderBy
- type ListCredentialsResponse
- type ListNamespacesRequest
- type ListNamespacesRequestOrderBy
- type ListNamespacesResponse
- type Namespace
- type NamespaceProtocol
- type Permissions
- type UpdateCredentialRequest
- type UpdateNamespaceRequest
Constants ¶
const ( ListCredentialsRequestOrderByIDAsc = ListCredentialsRequestOrderBy("id_asc") ListCredentialsRequestOrderByIDDesc = ListCredentialsRequestOrderBy("id_desc") ListCredentialsRequestOrderByNameAsc = ListCredentialsRequestOrderBy("name_asc") ListCredentialsRequestOrderByNameDesc = ListCredentialsRequestOrderBy("name_desc") )
const ( ListNamespacesRequestOrderByCreatedAtAsc = ListNamespacesRequestOrderBy("created_at_asc") ListNamespacesRequestOrderByCreatedAtDesc = ListNamespacesRequestOrderBy("created_at_desc") ListNamespacesRequestOrderByUpdatedAtAsc = ListNamespacesRequestOrderBy("updated_at_asc") ListNamespacesRequestOrderByUpdatedAtDesc = ListNamespacesRequestOrderBy("updated_at_desc") ListNamespacesRequestOrderByIDAsc = ListNamespacesRequestOrderBy("id_asc") ListNamespacesRequestOrderByIDDesc = ListNamespacesRequestOrderBy("id_desc") ListNamespacesRequestOrderByNameAsc = ListNamespacesRequestOrderBy("name_asc") ListNamespacesRequestOrderByNameDesc = ListNamespacesRequestOrderBy("name_desc") ListNamespacesRequestOrderByProjectIDAsc = ListNamespacesRequestOrderBy("project_id_asc") ListNamespacesRequestOrderByProjectIDDesc = ListNamespacesRequestOrderBy("project_id_desc") )
const ( NamespaceProtocolUnknown = NamespaceProtocol("unknown") NamespaceProtocolNats = NamespaceProtocol("nats") NamespaceProtocolSqsSns = NamespaceProtocol("sqs_sns") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: this API allows you to manage Messaging or Queueing brokers. MnQ API (beta).
func (*API) CreateCredential ¶
func (s *API) CreateCredential(req *CreateCredentialRequest, opts ...scw.RequestOption) (*Credential, error)
CreateCredential: create a set of credentials. Create a set of credentials for a specific namespace.
func (*API) CreateNamespace ¶
func (s *API) CreateNamespace(req *CreateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
CreateNamespace: create a namespace.
func (*API) DeleteCredential ¶
func (s *API) DeleteCredential(req *DeleteCredentialRequest, opts ...scw.RequestOption) error
DeleteCredential: delete credentials.
func (*API) DeleteNamespace ¶
func (s *API) DeleteNamespace(req *DeleteNamespaceRequest, opts ...scw.RequestOption) error
DeleteNamespace: delete a namespace.
func (*API) GetCredential ¶
func (s *API) GetCredential(req *GetCredentialRequest, opts ...scw.RequestOption) (*Credential, error)
GetCredential: get a set of credentials.
func (*API) GetNamespace ¶
func (s *API) GetNamespace(req *GetNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
GetNamespace: get a namespace.
func (*API) ListCredentials ¶
func (s *API) ListCredentials(req *ListCredentialsRequest, opts ...scw.RequestOption) (*ListCredentialsResponse, error)
ListCredentials: list credentials.
func (*API) ListNamespaces ¶
func (s *API) ListNamespaces(req *ListNamespacesRequest, opts ...scw.RequestOption) (*ListNamespacesResponse, error)
ListNamespaces: list namespaces.
func (*API) UpdateCredential ¶
func (s *API) UpdateCredential(req *UpdateCredentialRequest, opts ...scw.RequestOption) (*Credential, error)
UpdateCredential: update a set of credentials.
func (*API) UpdateNamespace ¶
func (s *API) UpdateNamespace(req *UpdateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)
UpdateNamespace: update the name of a namespace.
type CreateCredentialRequest ¶
type CreateCredentialRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // NamespaceID: namespace containing the Credential. NamespaceID string `json:"namespace_id"` // Name: credential name. Name string `json:"name"` // Permissions: list of permissions associated to this Credential. // Precisely one of Permissions must be set. Permissions *Permissions `json:"permissions,omitempty"` }
type CreateNamespaceRequest ¶
type CreateNamespaceRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // Name: namespace name. Name string `json:"name"` // Protocol: namespace protocol. // Default value: unknown Protocol NamespaceProtocol `json:"protocol"` // ProjectID: project containing the Namespace. ProjectID string `json:"project_id"` }
type Credential ¶
type Credential struct { // ID: credential ID. ID string `json:"id"` // Name: credential name. Name string `json:"name"` // NamespaceID: namespace containing the Credential. NamespaceID string `json:"namespace_id"` // Protocol: protocol associated to the Credential. // Default value: unknown Protocol NamespaceProtocol `json:"protocol"` // NatsCredentials: credentials file used to connect to the NATS service. // Precisely one of NatsCredentials, SqsSnsCredentials must be set. NatsCredentials *CredentialNATSCredsFile `json:"nats_credentials,omitempty"` // SqsSnsCredentials: credential used to connect to the SQS/SNS service. // Precisely one of NatsCredentials, SqsSnsCredentials must be set. SqsSnsCredentials *CredentialSQSSNSCreds `json:"sqs_sns_credentials,omitempty"` }
Credential: credential.
type CredentialNATSCredsFile ¶
type CredentialNATSCredsFile struct { // Content: raw content of the NATS credentials file. Content string `json:"content"` }
CredentialNATSCredsFile: credential.nats creds file.
type CredentialSQSSNSCreds ¶
type CredentialSQSSNSCreds struct { // AccessKey: ID of the key. AccessKey string `json:"access_key"` // SecretKey: secret value of the key. SecretKey *string `json:"secret_key"` // Permissions: list of permissions associated to this Credential. Permissions *Permissions `json:"permissions"` }
CredentialSQSSNSCreds: credential.sqssns creds.
type CredentialSummary ¶
type CredentialSummary struct { // ID: credential ID. ID string `json:"id"` // Name: credential name. Name string `json:"name"` // NamespaceID: namespace containing the Credential. NamespaceID string `json:"namespace_id"` // Protocol: protocol associated to the Credential. // Default value: unknown Protocol NamespaceProtocol `json:"protocol"` // SqsSnsCredentials: credential used to connect to the SQS/SNS service. // Precisely one of SqsSnsCredentials must be set. SqsSnsCredentials *CredentialSummarySQSSNSCreds `json:"sqs_sns_credentials,omitempty"` }
CredentialSummary: credential summary.
type CredentialSummarySQSSNSCreds ¶
type CredentialSummarySQSSNSCreds struct { // AccessKey: ID of the key. AccessKey string `json:"access_key"` // Permissions: list of permissions associated to this Credential. Permissions *Permissions `json:"permissions"` }
CredentialSummarySQSSNSCreds: credential summary.sqssns creds.
type DeleteCredentialRequest ¶
type DeleteNamespaceRequest ¶
type GetCredentialRequest ¶
type GetNamespaceRequest ¶
type ListCredentialsRequest ¶
type ListCredentialsRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // NamespaceID: namespace containing the Credential. NamespaceID *string `json:"-"` // Page: indicate the page number of results to be returned. Page *int32 `json:"-"` // PageSize: maximum number of results returned by page. PageSize *uint32 `json:"-"` // OrderBy: field used for sorting results. // Default value: id_asc OrderBy ListCredentialsRequestOrderBy `json:"-"` }
type ListCredentialsRequestOrderBy ¶
type ListCredentialsRequestOrderBy string
func (ListCredentialsRequestOrderBy) MarshalJSON ¶
func (enum ListCredentialsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListCredentialsRequestOrderBy) String ¶
func (enum ListCredentialsRequestOrderBy) String() string
func (*ListCredentialsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListCredentialsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListCredentialsResponse ¶
type ListCredentialsResponse struct { // TotalCount: total number of existing Credentials. TotalCount uint32 `json:"total_count"` // Credentials: a page of Credentials. Credentials []*CredentialSummary `json:"credentials"` }
ListCredentialsResponse: list credentials response.
func (*ListCredentialsResponse) UnsafeAppend ¶
func (r *ListCredentialsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListCredentialsResponse) UnsafeGetTotalCount ¶
func (r *ListCredentialsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListNamespacesRequest ¶
type ListNamespacesRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // OrganizationID: will list only the Namespaces owned by the specified organization. OrganizationID *string `json:"-"` // ProjectID: will list only the Namespaces contained into the specified project. ProjectID *string `json:"-"` // Page: indicate the page number of results to be returned. Page *int32 `json:"-"` // PageSize: maximum number of results returned by page. PageSize *uint32 `json:"-"` // OrderBy: field used for sorting results. // Default value: created_at_asc OrderBy ListNamespacesRequestOrderBy `json:"-"` }
type ListNamespacesRequestOrderBy ¶
type ListNamespacesRequestOrderBy string
func (ListNamespacesRequestOrderBy) MarshalJSON ¶
func (enum ListNamespacesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListNamespacesRequestOrderBy) String ¶
func (enum ListNamespacesRequestOrderBy) String() string
func (*ListNamespacesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListNamespacesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListNamespacesResponse ¶
type ListNamespacesResponse struct { // TotalCount: total number of existing Namespaces. TotalCount uint32 `json:"total_count"` // Namespaces: a page of Namespaces. Namespaces []*Namespace `json:"namespaces"` }
ListNamespacesResponse: list namespaces response.
func (*ListNamespacesResponse) UnsafeAppend ¶
func (r *ListNamespacesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListNamespacesResponse) UnsafeGetTotalCount ¶
func (r *ListNamespacesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type Namespace ¶
type Namespace struct { // ID: namespace ID. ID string `json:"id"` // Name: namespace name. Name string `json:"name"` // Endpoint: endpoint of the service matching the Namespace protocol. Endpoint string `json:"endpoint"` // Protocol: namespace protocol. // Default value: unknown Protocol NamespaceProtocol `json:"protocol"` // ProjectID: project containing the Namespace. ProjectID string `json:"project_id"` // Region: region where the Namespace is deployed. Region scw.Region `json:"region"` // CreatedAt: namespace creation date. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: namespace last modification date. UpdatedAt *time.Time `json:"updated_at"` }
Namespace: namespace.
type NamespaceProtocol ¶
type NamespaceProtocol string
func (NamespaceProtocol) MarshalJSON ¶
func (enum NamespaceProtocol) MarshalJSON() ([]byte, error)
func (NamespaceProtocol) String ¶
func (enum NamespaceProtocol) String() string
func (*NamespaceProtocol) UnmarshalJSON ¶
func (enum *NamespaceProtocol) UnmarshalJSON(data []byte) error
type Permissions ¶
type Permissions struct { // CanPublish: defines if user can publish messages to the service. CanPublish *bool `json:"can_publish"` // CanReceive: defines if user can receive messages from the service. CanReceive *bool `json:"can_receive"` // CanManage: defines if user can manage the associated resource(s). CanManage *bool `json:"can_manage"` }
Permissions: permissions.
type UpdateCredentialRequest ¶
type UpdateCredentialRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // CredentialID: ID of the Credential to update. CredentialID string `json:"-"` // Name: credential name. Name *string `json:"name"` // Permissions: list of permissions associated to this Credential. // Precisely one of Permissions must be set. Permissions *Permissions `json:"permissions,omitempty"` }