cloudapi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API added in v0.3.0

type API interface {
	ValidateToken(ctx context.Context) error
	Repos(ctx context.Context) ([]Repo, error)
}

API defines how to interact with the Atlas Cloud API.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client for the Atlas Cloud API.

func New

func New(endpoint, token string) *Client

New creates a new Client for the Atlas Cloud API.

func (*Client) Repos added in v0.3.0

func (c *Client) Repos(ctx context.Context) ([]Repo, error)

Repos fetches data of all repositories from the Atlas Cloud.

func (*Client) ValidateToken

func (c *Client) ValidateToken(ctx context.Context) error

ValidateToken validates the token inside the client with the Atlas Cloud API.

type Repo added in v0.3.0

type Repo struct {
	URL    string
	Title  string
	Slug   string
	Type   RepoType
	Driver string
}

Repo represents a project in the Atlas Cloud API.

type RepoType added in v0.3.0

type RepoType string

RepoType represents the type of an Atlas Cloud repository.

const (
	SchemaType    RepoType = "SCHEMA"
	DirectoryType RepoType = "MIGRATION_DIRECTORY"
)

Jump to

Keyboard shortcuts

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