api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZeaburServerURL = "https://gateway.zeabur.com"
	WebsocketURL    = "wss://gateway.zeabur.com"
)
View Source
const (
	ZeaburHTTPAPIEndpoint       = "https://gateway.zeabur.com/api/v1"
	ZeaburGraphQLAPIEndpoint    = ZeaburServerURL + "/graphql"
	WSSZeaburGraphQLAPIEndpoint = WebsocketURL + "/graphql"
)

Variables

This section is empty.

Functions

func NewGraphQLClientWithToken

func NewGraphQLClientWithToken(token string) *graphql.Client

NewGraphQLClientWithToken returns a new GraphQL client with the given token.

func NewSubscriptionClient

func NewSubscriptionClient(token string) *graphql.SubscriptionClient

Types

type Client

type Client struct {
	*graphql.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string) *Client

func (*Client) CreateProject

func (c *Client) CreateProject(ctx context.Context, region string, name *string) (*model.Project, error)

func (*Client) DeleteProject

func (c *Client) DeleteProject(ctx context.Context, id string) error

DeleteProject deletes a project by its ID.

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, projectID string) (*model.Project, error)

func (*Client) GetProjectByOwnerAndName

func (c *Client) GetProjectByOwnerAndName(ctx context.Context, owner, name string) (*model.Project, error)

GetProjectByOwnerAndName returns a project by its owner and name.

type ObjectID

type ObjectID string

Jump to

Keyboard shortcuts

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