shipclient

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppOptions

type AppOptions struct {
	Name string
}

type ChannelOptions

type ChannelOptions struct {
	Name        string
	Description string
}

type CreateEntitlementSpecResponse added in v0.11.0

type CreateEntitlementSpecResponse struct {
	CreateEntitlementSpec *types.EntitlementSpec `json:"createEntitlementSpec,omitempty"`
}

type CreateEntitlementValueResponse added in v0.11.0

type CreateEntitlementValueResponse struct {
	CreateEntitlementValue *types.EntitlementValue `json:"createEntitlementValue,omitempty"`
}

type CreateSupportBundleSpec added in v0.12.0

type CreateSupportBundleSpec struct {
	ID     string `json:"id"`
	Name   string `json:"name,omitempty"`
	Config string `json:"spec,omitempty"`
}

type GetSupportBundleSpec added in v0.12.0

type GetSupportBundleSpec struct {
	ID        string `json:"id"`
	Name      string `json:"name,omitempty"`
	Config    string `json:"spec,omitempty"`
	CreatedAt string `json:"createdAt"`
}

type GraphQLClient

type GraphQLClient struct {
	GraphQLClient *graphql.Client
}

Client communicates with the Replicated Vendor GraphQL API.

func NewGraphQLClient

func NewGraphQLClient(origin string, apiKey string) *GraphQLClient

func (*GraphQLClient) CreateChannel

func (c *GraphQLClient) CreateChannel(appID string, name string, description string) (*types.Channel, error)

func (*GraphQLClient) CreateCollector added in v0.12.0

func (c *GraphQLClient) CreateCollector(appID string, name string, yaml string) (*v1.AppCollectorInfo, error)

CreateCollector creates a new collector based on given yaml and name

func (*GraphQLClient) CreateEntitlementSpec added in v0.11.0

func (c *GraphQLClient) CreateEntitlementSpec(appID string, name string, spec string) (*types.EntitlementSpec, error)

func (*GraphQLClient) CreateRelease

func (c *GraphQLClient) CreateRelease(appID string, yaml string) (*types.ReleaseInfo, error)

func (*GraphQLClient) ExecuteRequest added in v0.12.0

func (c *GraphQLClient) ExecuteRequest(requestObj graphql.Request, deserializeTarget interface{}) error

func (*GraphQLClient) GetApp

func (c *GraphQLClient) GetApp(appID string) (*types.App, error)

func (*GraphQLClient) GetChannel added in v0.16.0

func (c *GraphQLClient) GetChannel(appID string, channelID string) (*channels.AppChannel, []channels.ChannelRelease, error)

func (*GraphQLClient) GetChannelByName added in v0.20.0

func (c *GraphQLClient) GetChannelByName(appID string, name string, description string, create bool) (*types.Channel, error)

func (*GraphQLClient) GetCollector added in v0.12.0

func (c *GraphQLClient) GetCollector(appID string, id string) (*v1.AppCollectorInfo, error)

GetCollector returns a collector's properties.

func (*GraphQLClient) LintRelease added in v0.8.0

func (c *GraphQLClient) LintRelease(appID string, yaml string) ([]types.LintMessage, error)

func (*GraphQLClient) ListApps

func (c *GraphQLClient) ListApps() ([]types.AppAndChannels, error)

func (*GraphQLClient) ListChannels

func (c *GraphQLClient) ListChannels(appID string) ([]types.Channel, error)

func (*GraphQLClient) ListCollectors added in v0.12.0

func (c *GraphQLClient) ListCollectors(appID string, appType string) ([]types.CollectorInfo, error)

func (*GraphQLClient) ListReleases

func (c *GraphQLClient) ListReleases(appID string) ([]types.ReleaseInfo, error)

func (*GraphQLClient) PromoteCollector added in v0.12.0

func (c *GraphQLClient) PromoteCollector(appID string, specID string, channelIDs ...string) error

PromoteCollector assigns collector to a specified channel.

func (*GraphQLClient) PromoteRelease

func (c *GraphQLClient) PromoteRelease(appID string, sequence int64, label string, notes string, channelIDs ...string) error

func (*GraphQLClient) SetDefaultEntitlementSpec added in v0.11.0

func (c *GraphQLClient) SetDefaultEntitlementSpec(specID string) error

func (*GraphQLClient) SetEntitlementValue added in v0.11.0

func (c *GraphQLClient) SetEntitlementValue(customerID string, specID string, key string, value string, datatype string, appId string) (*types.EntitlementValue, error)

func (*GraphQLClient) UpdateCollector added in v0.12.0

func (c *GraphQLClient) UpdateCollector(appID string, specID, yaml string) (interface{}, error)

func (*GraphQLClient) UpdateCollectorName added in v0.12.0

func (c *GraphQLClient) UpdateCollectorName(appID string, specID, name string) (interface{}, error)

func (*GraphQLClient) UpdateRelease

func (c *GraphQLClient) UpdateRelease(appID string, sequence int64, yaml string) error

type GraphQLResponseCreateChannel added in v0.20.0

type GraphQLResponseCreateChannel struct {
	Data   *ShipCreateChannelData `json:"data,omitempty"`
	Errors []graphql.GQLError     `json:"errors,omitempty"`
}

type GraphQLResponseCreateCollector added in v0.12.0

type GraphQLResponseCreateCollector struct {
	Data *SupportBundleCreateSpecData `json:"data,omitempty"`
}

type GraphQLResponseCreateEntitlementSpec added in v0.11.0

type GraphQLResponseCreateEntitlementSpec struct {
	Data   *CreateEntitlementSpecResponse `json:"data,omitempty"`
	Errors []graphql.GQLError             `json:"errors,omitempty"`
}

type GraphQLResponseCreateEntitlementValue added in v0.11.0

type GraphQLResponseCreateEntitlementValue struct {
	Data   *CreateEntitlementValueResponse `json:"data,omitempty"`
	Errors []graphql.GQLError              `json:"errors,omitempty"`
}

type GraphQLResponseFinalizeRelease added in v0.9.0

type GraphQLResponseFinalizeRelease struct {
	Data   *ShipFinalizeCreateData `json:"data,omitempty"`
	Errors []graphql.GQLError      `json:"errors,omitempty"`
}

type GraphQLResponseGetChannel added in v0.16.0

type GraphQLResponseGetChannel struct {
	Data   *ShipGetChannelData `json:"data,omitempty"`
	Errors []graphql.GQLError  `json:"errors,omitempty"`
}

type GraphQLResponseGetCollector added in v0.12.0

type GraphQLResponseGetCollector struct {
	Data *SupportBundleGetSpecData `json:"data,omitempty"`
}

type GraphQLResponseLintRelease added in v0.8.0

type GraphQLResponseLintRelease struct {
	Data   *ShipReleaseLintData `json:"data,omitempty"`
	Errors []graphql.GQLError   `json:"errors,omitempty"`
}

type GraphQLResponseListApps

type GraphQLResponseListApps struct {
	Data   *ShipData          `json:"data,omitempty"`
	Errors []graphql.GQLError `json:"errors,omitempty"`
}

type GraphQLResponseListChannels

type GraphQLResponseListChannels struct {
	Data   *ShipChannelData   `json:"data,omitempty"`
	Errors []graphql.GQLError `json:"errors,omitempty"`
}

type GraphQLResponseListCollectors added in v0.12.0

type GraphQLResponseListCollectors struct {
	Data *SupportBundleSpecsData `json:"data,omitempty"`
}

type GraphQLResponseListReleases

type GraphQLResponseListReleases struct {
	Data   *ShipReleasesData  `json:"data,omitempty"`
	Errors []graphql.GQLError `json:"errors,omitempty"`
}

type GraphQLResponseSetDefault added in v0.11.0

type GraphQLResponseSetDefault struct {
	Data   map[string]interface{} `json:"data,omitempty"` // dont care
	Errors []graphql.GQLError     `json:"errors,omitempty"`
}

type GraphQLResponseUpdateCollector added in v0.12.0

type GraphQLResponseUpdateCollector struct {
	Data *SupportBundleUpdateSpecData `json:"data,omitempty"`
}

type GraphQLResponseUpdateNameCollector added in v0.12.0

type GraphQLResponseUpdateNameCollector struct {
	Data *SupportBundleUpdateSpecNameData `json:"data,omitempty"`
}

type GraphQLResponseUploadRelease added in v0.9.0

type GraphQLResponseUploadRelease struct {
	Data   ShipReleaseUploadData `json:"data,omitempty"`
	Errors []graphql.GQLError    `json:"errors,omitempty"`
}

type PlatformChannel added in v0.12.0

type PlatformChannel struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type PlatformGQLResponseListCollectors added in v0.12.0

type PlatformGQLResponseListCollectors struct {
	Data *PlatformSupportBundleSpecsData `json:"data,omitempty"`
}

PLATFORM

type PlatformSupportBundleSpec added in v0.12.0

type PlatformSupportBundleSpec struct {
	ID        string          `json:"id"`
	Name      string          `json:"name"`
	CreatedAt string          `json:"createdAt"`
	Channels  []types.Channel `json:"platformChannels"`
	Config    string          `json:"spec,omitempty"`
}

type PlatformSupportBundleSpecsData added in v0.12.0

type PlatformSupportBundleSpecsData struct {
	PlatformSupportBundleSpecs []*PlatformSupportBundleSpec `json:"supportBundleSpecs"`
}

type ShipApp

type ShipApp struct {
	ID       string        `json:"id"`
	Name     string        `json:"name"`
	Slug     string        `json:"slug"`
	Channels []ShipChannel `json:"channel"`
}

type ShipAppsData

type ShipAppsData struct {
	ShipApps []*ShipApp `json:"apps"`
}

type ShipChannel

type ShipChannel struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Description     string `json:"description"`
	CurrentSequence int64  `json:"currentSequence"`
	CurrentVersion  string `json:"currentVersion"`
}

type ShipChannelData

type ShipChannelData struct {
	ShipChannels []*ShipChannel `json:"getAppChannels"`
}

type ShipCreateChannelData added in v0.20.0

type ShipCreateChannelData struct {
	ShipChannel *ShipChannel `json:"createChannel"`
}

type ShipData

type ShipData struct {
	Ship *ShipAppsData `json:"ship"`
}

type ShipFinalizeCreateData added in v0.9.0

type ShipFinalizeCreateData struct {
	ShipRelease *ShipRelease `json:"finalizeUploadedRelease"`
}

type ShipGetChannelData added in v0.16.0

type ShipGetChannelData struct {
	ShipChannel *ShipChannel `json:"getChannel"`
}

type ShipPendingReleaseData added in v0.9.0

type ShipPendingReleaseData struct {
	UploadURI string `json:"uploadUri"`
	UploadID  string `json:"id"`
}

type ShipRelease

type ShipRelease struct {
	ID           string         `json:"id"`
	Sequence     int64          `json:"sequence"`
	CreatedAt    string         `json:"created"`
	ReleaseNotes string         `json:"releaseNotes"`
	Channels     []*ShipChannel `json:"channels"`
}

type ShipReleaseLintData added in v0.8.0

type ShipReleaseLintData struct {
	Messages []types.LintMessage `json:"lintRelease"`
}

type ShipReleaseUploadData added in v0.9.0

type ShipReleaseUploadData struct {
	ShipPendingReleaseData *ShipPendingReleaseData `json:"uploadRelease"`
}

type ShipReleasesData

type ShipReleasesData struct {
	ShipReleases []*ShipRelease `json:"allReleases"`
}

type SupportBundleCreateSpecData added in v0.12.0

type SupportBundleCreateSpecData struct {
	CreateSupportBundleSpec *CreateSupportBundleSpec `json:"createSupportBundleSpec"`
}

type SupportBundleGetSpecData added in v0.12.0

type SupportBundleGetSpecData struct {
	GetSupportBundleSpec *GetSupportBundleSpec `json:"supportBundleSpec"`
}

type SupportBundleSpec added in v0.12.0

type SupportBundleSpec struct {
	ID        string          `json:"id"`
	Name      string          `json:"name"`
	CreatedAt string          `json:"createdAt"`
	Channels  []types.Channel `json:"channels"`
	Config    string          `json:"spec,omitempty"`
}

type SupportBundleSpecsData added in v0.12.0

type SupportBundleSpecsData struct {
	SupportBundleSpecs []*SupportBundleSpec `json:"supportBundleSpecs"`
}

type SupportBundleUpdateSpecData added in v0.12.0

type SupportBundleUpdateSpecData struct {
	UpdateSupportBundleSpec *UpdateSupportBundleSpec `json:"updateSupportBundleSpec"`
}

type SupportBundleUpdateSpecNameData added in v0.12.0

type SupportBundleUpdateSpecNameData struct {
	UpdateSupportBundleSpecName *UpdateSupportBundleSpecName `json:"updateSupportBundleSpecName"`
}

type UpdateSupportBundleSpec added in v0.12.0

type UpdateSupportBundleSpec struct {
	ID     string `json:"id"`
	Config string `json:"spec,omitempty"`
}

type UpdateSupportBundleSpecName added in v0.12.0

type UpdateSupportBundleSpecName struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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