channels

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryAddChannel       = "addChannel"
	AddChannelVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"name":{{json .Name}}{{end}}`
)
View Source
const (
	QueryChannel       = "channel"
	ChannelVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"uuid":{{json .UUID}}{{end}}`
)
View Source
const (
	QueryChannelByName       = "channelByName"
	ChannelByNameVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"name":{{json .Name}}{{end}}`
)
View Source
const (
	QueryChannels       = "channels"
	ChannelsVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}}{{end}}`
)
View Source
const (
	QueryRemoveChannel       = "removeChannel"
	RemoveChannelVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"uuid":{{json .UUID}}{{end}}`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddChannelResponse

type AddChannelResponse struct {
	Data *AddChannelResponseData `json:"data,omitempty"`
}

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

type AddChannelResponseData

type AddChannelResponseData struct {
	Details *AddChannelResponseDataDetails `json:"addChannel,omitempty"`
}

type AddChannelResponseDataDetails

type AddChannelResponseDataDetails struct {
	UUID string `json:"uuid,omitempty"`
}

type AddChannelVariables

type AddChannelVariables struct {
	actions.GraphQLQuery
	OrgID string
	Name  string
}

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

func NewAddChannelVariables

func NewAddChannelVariables(orgID, name string) AddChannelVariables

NewAddChannelVariables creates a correctly formed instance of AddChannelVariables.

type ChannelByNameResponse

type ChannelByNameResponse struct {
	Data *ChannelByNameResponseData `json:"data,omitempty"`
}

ChannelVersionByNameResponse top level response struct

type ChannelByNameResponseData

type ChannelByNameResponseData struct {
	Details *types.Channel `json:"channelByName,omitempty"`
}

ChannelVersionByNameResponseData provides response details

type ChannelByNameVariables

type ChannelByNameVariables struct {
	actions.GraphQLQuery
	OrgID string
	Name  string
}

ChannelByNameVariables to query channel by name

func NewChannelByNameVariables

func NewChannelByNameVariables(orgID, channelName string) ChannelByNameVariables

NewChannelByNameVariables returns appropriate variables to query channel

type ChannelResponse

type ChannelResponse struct {
	Data *ChannelResponseData `json:"data,omitempty"`
}

ChannelResponse channel data

type ChannelResponseData

type ChannelResponseData struct {
	Channel *types.Channel `json:"channel,omitempty"`
}

ChannelResponseData channel details

type ChannelService

type ChannelService interface {
	AddChannel(orgId, name string) (*AddChannelResponseDataDetails, error)
	Channel(orgId, uuid string) (*types.Channel, error)
	ChannelByName(orgID, channelName string) (*types.Channel, error)
	Channels(orgId string) (types.ChannelList, error)
	RemoveChannel(orgId, uuid string) (*RemoveChannelResponseDataDetails, error)
}

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

func NewClient

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

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

type ChannelVariables

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

ChannelVariables to query channel

func NewChannelVariables

func NewChannelVariables(orgID, uuid string) ChannelVariables

NewChannelVariables returns required query variables

type ChannelsResponse

type ChannelsResponse struct {
	Data *ChannelsResponseData `json:"data,omitempty"`
}

type ChannelsResponseData

type ChannelsResponseData struct {
	Channels types.ChannelList `json:"channels,omitempty"`
}

type ChannelsVariables

type ChannelsVariables struct {
	actions.GraphQLQuery
	OrgID string
}

func NewChannelsVariables

func NewChannelsVariables(orgID string) ChannelsVariables

type Client

type Client struct {
	web.SatConClient
}

Client is an implementation of a satcon client.

func (*Client) AddChannel

func (c *Client) AddChannel(orgID, name string) (*AddChannelResponseDataDetails, error)

func (*Client) Channel

func (c *Client) Channel(orgID, uuid string) (*types.Channel, error)

Channel returns channel specified by channeUuid

func (*Client) ChannelByName

func (c *Client) ChannelByName(orgID, channelName string) (*types.Channel, error)

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

func (*Client) Channels

func (c *Client) Channels(orgID string) (types.ChannelList, error)

func (*Client) RemoveChannel

func (c *Client) RemoveChannel(orgID, uuid string) (*RemoveChannelResponseDataDetails, error)

type RemoveChannelResponse

type RemoveChannelResponse struct {
	Data *RemoveChannelResponseData `json:"data,omitempty"`
}

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

type RemoveChannelResponseData

type RemoveChannelResponseData struct {
	Details *RemoveChannelResponseDataDetails `json:"removeChannel,omitempty"`
}

type RemoveChannelResponseDataDetails

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

type RemoveChannelVariables

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

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

func NewRemoveChannelVariables

func NewRemoveChannelVariables(orgID, uuid string) RemoveChannelVariables

NewRemoveChannelVariables creates a correctly formed instance of RemoveChannelVariables.

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