versions

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentType                  = "application/yaml"
	QueryAddChannelVersion       = "addChannelVersion"
	AddChannelVersionVarTemplate = `` /* 198-byte string literal not displayed */
)
View Source
const (
	//QueryChannelVersion specifies the query
	QueryChannelVersion = "channelVersion"
	// ChannelVersionVarTemplate is the template used to create the graphql query
	ChannelVersionVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"channelUuid":{{json .ChannelUUID}},"versionUuid":{{json .VersionUUID}}{{end}}`
)
View Source
const (
	//QueryChannelVersionByName specifies the query
	QueryChannelVersionByName = "channelVersionByName"
	// ChannelVersionByNameVarTemplate is the template used to create the graphql query
	ChannelVersionByNameVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"channelName":{{json .ChannelName}},"versionName":{{json .VersionName}}{{end}}`
)
View Source
const (
	QueryRemoveChannelVersion       = "removeChannelVersion"
	RemoveChannelVersionVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"uuid":{{json .UUID}}{{end}}`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddChannelVersionResponse

type AddChannelVersionResponse struct {
	Data *AddChannelVersionResponseData `json:"data,omitempty"`
}

AddChannelVersionResponse for unmarshalling the response data

type AddChannelVersionResponseData

type AddChannelVersionResponseData struct {
	Details *AddChannelVersionResponseDataDetails `json:"addChannelVersion,omitempty"`
}

AddChannelVersionResponseData for unmarshalling response details

type AddChannelVersionResponseDataDetails

type AddChannelVersionResponseDataDetails struct {
	VersionUUID string `json:"versionUuid,omitempty"`
	Success     bool   `json:"success,omitempty"`
}

AddChannelVersionResponseDataDetails for unmarshalling response uuid

type AddChannelVersionVariables

type AddChannelVersionVariables struct {
	actions.GraphQLQuery
	OrgID       string
	ChannelUUID string
	Name        string
	ContentType string
	Content     string
	File        string
	Description string
}

AddChannelVersionVariables to create addChannelVersion graphql request

func NewAddChannelVersionVariables

func NewAddChannelVersionVariables(orgID, channelUuid, name, contentType string, content string, file, description string) AddChannelVersionVariables

NewAddChannelVersionVariables creates query variable

type ChannelVersionByNameResponse

type ChannelVersionByNameResponse struct {
	Data *ChannelVersionByNameResponseData `json:"data,omitempty"`
}

ChannelVersionByNameResponse top level response struct

type ChannelVersionByNameResponseData

type ChannelVersionByNameResponseData struct {
	Details *types.DeployableVersion `json:"channelVersionByName,omitempty"`
}

ChannelVersionByNameResponseData provides response details

type ChannelVersionByNameVariables

type ChannelVersionByNameVariables struct {
	actions.GraphQLQuery
	OrgID       string
	ChannelName string
	VersionName string
}

SubscriptionsVariables are the variables used for the subscription query

func NewChannelVersionByNameVariables

func NewChannelVersionByNameVariables(orgID, channelName, versionName string) ChannelVersionByNameVariables

type ChannelVersionResponse

type ChannelVersionResponse struct {
	Data *ChannelVersionResponseData `json:"data,omitempty"`
}

ChannelVersionResponse top level response struct

type ChannelVersionResponseData

type ChannelVersionResponseData struct {
	Details *types.DeployableVersion `json:"channelVersion,omitempty"`
}

ChannelVersionResponseData provides response details

type ChannelVersionVariables

type ChannelVersionVariables struct {
	actions.GraphQLQuery
	OrgID       string
	ChannelUUID string
	VersionUUID string
}

ChannelVersionVariables are the variables used for the subscription query

func NewChannelVersionVariables

func NewChannelVersionVariables(orgID, channelUuid, versionUuid string) ChannelVersionVariables

NewChannelVersionVariables returns variables required for channelVersion query

type Client

type Client struct {
	web.SatConClient
}

Client is an implementation of a satcon client.

func (*Client) AddChannelVersion

func (c *Client) AddChannelVersion(orgID, channelUuid, name string, content []byte, description string) (*AddChannelVersionResponseDataDetails, error)

AddChannelVersion creates a new channelVersion for valid channel. contentFile is path to yaml file

func (*Client) ChannelVersion

func (c *Client) ChannelVersion(orgID, channelUuid, versionUuid string) (*types.DeployableVersion, error)

ChannelVersion queries a channel version given orgID, channelUuid, and versionUuid

func (*Client) ChannelVersionByName

func (c *Client) ChannelVersionByName(orgID, channelName, versionName string) (*types.DeployableVersion, error)

ChannelVersionByName queries a channel version given orgID, channelName, and versionName

func (*Client) RemoveChannelVersion

func (c *Client) RemoveChannelVersion(orgID, uuid string) (*RemoveChannelVersionResponseDataDetails, error)

type RemoveChannelVersionResponse

type RemoveChannelVersionResponse struct {
	Data *RemoveChannelVersionResponseData `json:"data,omitempty"`
}

RemoveChannelVersionResponse is the response body we get upon a successful cluster registration.

type RemoveChannelVersionResponseData

type RemoveChannelVersionResponseData struct {
	Details *RemoveChannelVersionResponseDataDetails `json:"removeChannelVersion,omitempty"`
}

type RemoveChannelVersionResponseDataDetails

type RemoveChannelVersionResponseDataDetails struct {
	UUID    string `json:"uuid,omitempty"`
	Success bool   `json:"success,omitempty"`
}

type RemoveChannelVersionVariables

type RemoveChannelVersionVariables struct {
	actions.GraphQLQuery
	OrgID string
	UUID  string
}

RemoveChannelVersionVariables are the variables specific to adding a group. These include the organization ID and the group name. Rather than instantiating this directly, use NewRemoveChannelVersionVariables().

func NewRemoveChannelVersionVariables

func NewRemoveChannelVersionVariables(orgID, uuid string) RemoveChannelVersionVariables

NewRemoveChannelVersionVariables creates a correctly formed instance of RemoveChannelVersionVariables.

type VersionService

type VersionService interface {
	AddChannelVersion(orgId, channelUuid, name string, content []byte, description string) (*AddChannelVersionResponseDataDetails, error)
	RemoveChannelVersion(orgId, uuid string) (*RemoveChannelVersionResponseDataDetails, error)
	ChannelVersion(orgID, channelUuid, versionUuid string) (*types.DeployableVersion, error)
	ChannelVersionByName(orgID, channelName, versionName string) (*types.DeployableVersion, error)
}

VersionService is the interface used to perform all channel-version-centric actions in Satellite Config.

func NewClient

func NewClient(endpointURL string, httpClient web.HTTPClient, authClient auth.AuthClient) (VersionService, error)

NewClient returns a configured instance of ClusterService which can then be used to perform cluster queries against Satellite Config.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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