internal

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromSpaceliftError added in v0.0.3

func FromSpaceliftError(err error) error

FromSpaceliftError wraps the error with a helpful message when encountering a Spacelift error. In this case an unauthorized error.

Types

type Client

type Client struct {
	Endpoint string
	Token    string
	Version  string
	Commit   string
	// contains filtered or unexported fields
}

Client represents a Spacelift client - in practice a thin wrapper over its (administrative) GraphQL API.

func NewClient added in v0.1.3

func NewClient(endpoint string, token string, requestsPerSecond, maxBurst *int) *Client

NewClient returns a new Spacelift client for the specified endpoint, token and limiter. If limiter is nil, no rate limit is imposed.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, mutationName string, m interface{}, variables map[string]interface{}) error

Mutate runs a GraphQL mutation.

func (*Client) Query

func (c *Client) Query(ctx context.Context, queryName string, q interface{}, variables map[string]interface{}) error

Query runs a GraphQL query.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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