Documentation
¶
Index ¶
- func ArchiveChannel(appID string, channelID string) error
- func GetChannel(appID string, channelID string) (interface{}, []interface{}, error)
- type AppOptions
- type ChannelOptions
- type Client
- type GraphQLClient
- func (c *GraphQLClient) CreateChannel(appID string, name string, description string) error
- func (c *GraphQLClient) CreateRelease(appID string, yaml string) (*types.ReleaseInfo, error)
- func (c *GraphQLClient) GetApp(appID string) (*types.App, error)
- func (c *GraphQLClient) LintRelease(appID string, yaml string) ([]types.LintMessage, error)
- func (c *GraphQLClient) ListApps() ([]types.AppAndChannels, error)
- func (c *GraphQLClient) ListChannels(appID string) ([]types.Channel, error)
- func (c *GraphQLClient) ListReleases(appID string) ([]types.ReleaseInfo, error)
- func (c *GraphQLClient) PromoteRelease(appID string, sequence int64, label string, notes string, channelIDs ...string) error
- func (c *GraphQLClient) UpdateRelease(appID string, sequence int64, yaml string) error
- type GraphQLError
- type GraphQLRequest
- type GraphQLResponseCreateRelease
- type GraphQLResponseErrorOnly
- type GraphQLResponseLintRelease
- type GraphQLResponseListApps
- type GraphQLResponseListChannels
- type GraphQLResponseListReleases
- type ShipApp
- type ShipAppsData
- type ShipChannel
- type ShipChannelData
- type ShipData
- type ShipError
- type ShipLintLinePosition
- type ShipLintMessage
- type ShipLintPosition
- type ShipRelease
- type ShipReleaseCreateData
- type ShipReleaseLintData
- type ShipReleasesData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveChannel ¶
func GetChannel ¶
Types ¶
type AppOptions ¶
type AppOptions struct {
Name string
}
type ChannelOptions ¶
type Client ¶
type Client interface {
ListApps() ([]types.AppAndChannels, error)
GetApp(appID string) (*types.App, error)
ListChannels(string) ([]types.Channel, error)
CreateChannel(string, string, string) error
ListReleases(appID string) ([]types.ReleaseInfo, error)
CreateRelease(appID string, yaml string) (*types.ReleaseInfo, error)
UpdateRelease(appID string, sequence int64, yaml string) error
PromoteRelease(appID string, sequence int64, label string, notes string, channelIDs ...string) error
LintRelease(string, string) ([]types.LintMessage, error)
}
func NewGraphQLClient ¶
type GraphQLClient ¶
GraphQLClient communicates with the Replicated Vendor GraphQL API.
func (*GraphQLClient) CreateChannel ¶
func (c *GraphQLClient) CreateChannel(appID string, name string, description string) error
func (*GraphQLClient) CreateRelease ¶
func (c *GraphQLClient) CreateRelease(appID string, yaml string) (*types.ReleaseInfo, error)
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) ListReleases ¶
func (c *GraphQLClient) ListReleases(appID string) ([]types.ReleaseInfo, error)
func (*GraphQLClient) PromoteRelease ¶
func (*GraphQLClient) UpdateRelease ¶
func (c *GraphQLClient) UpdateRelease(appID string, sequence int64, yaml string) error
type GraphQLError ¶
type GraphQLError struct {
Locations []map[string]interface{} `json:"locations"`
Message string `json:"message"`
Code string `json:"code"`
}
GraphQLError represents an error returned by the graphql server
type GraphQLRequest ¶
type GraphQLRequest struct {
Query string `json:"query,omitempty"`
Variables map[string]interface{} `json:"variables"`
OperationName string `json:"operationName"`
}
GraphQLRequest is a json-serializable request to the graphql server
type GraphQLResponseCreateRelease ¶
type GraphQLResponseCreateRelease struct {
Data *ShipReleaseCreateData `json:"data,omitempty"`
Errors []GraphQLError `json:"errors,omitempty"`
}
type GraphQLResponseErrorOnly ¶
type GraphQLResponseErrorOnly struct {
Errors []GraphQLError `json:"errors,omitempty"`
}
type GraphQLResponseLintRelease ¶ added in v0.8.0
type GraphQLResponseLintRelease struct {
Data *ShipReleaseLintData `json:"data,omitempty"`
Errors []GraphQLError `json:"errors,omitempty"`
}
type GraphQLResponseListApps ¶
type GraphQLResponseListApps struct {
Data *ShipData `json:"data,omitempty"`
Errors []GraphQLError `json:"errors,omitempty"`
}
type GraphQLResponseListChannels ¶
type GraphQLResponseListChannels struct {
Data *ShipChannelData `json:"data,omitempty"`
Errors []GraphQLError `json:"errors,omitempty"`
}
type GraphQLResponseListReleases ¶
type GraphQLResponseListReleases struct {
Data *ShipReleasesData `json:"data,omitempty"`
Errors []GraphQLError `json:"errors,omitempty"`
}
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 ShipChannelData ¶
type ShipChannelData struct {
ShipChannels []*ShipChannel `json:"getAppChannels"`
}
type ShipData ¶
type ShipData struct {
Ship *ShipAppsData `json:"ship"`
}
type ShipError ¶
type ShipError interface {
GraphQLError() []GraphQLError
}
type ShipLintLinePosition ¶ added in v0.8.0
type ShipLintMessage ¶ added in v0.8.0
type ShipLintMessage struct {
Rule string `json:"rule"`
Type string `json:"type"`
Positions []*ShipLintPosition `json:"positions"`
}
type ShipLintPosition ¶ added in v0.8.0
type ShipLintPosition struct {
Path string `json:"path"`
Start *ShipLintLinePosition `json:"start"`
End *ShipLintLinePosition `json:"end"`
}
type ShipRelease ¶
type ShipReleaseCreateData ¶
type ShipReleaseCreateData struct {
ShipRelease *ShipRelease `json:"createRelease"`
}
type ShipReleaseLintData ¶ added in v0.8.0
type ShipReleaseLintData struct {
Messages []*ShipLintMessage `json:"lintRelease"`
}
type ShipReleasesData ¶
type ShipReleasesData struct {
ShipReleases []*ShipRelease `json:"allReleases"`
}
Click to show internal directories.
Click to hide internal directories.