client

package
v1.11.28 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type All

type All interface {
	Organization | Environment
}

type Environment

type Environment struct {
	Name              string `json:"name"`
	Id                string `json:"id"`
	Connected         bool   `json:"connected"`
	Owner             string `json:"owner"`
	InstallCommand    string `json:"installCommand,omitempty"`
	InstallCommandCli string `json:"installCommandCli,omitempty"`
	OrganizationId    string `json:"organizationId,omitempty"`
	AgentToken        string `json:"agentToken,omitempty"`
}

type EnvironmentsClient

type EnvironmentsClient struct {
	RESTClient[Environment]
}

func NewEnvironmentsClient

func NewEnvironmentsClient(rootDomain, token string) *EnvironmentsClient

func (EnvironmentsClient) Create

type ListResponse

type ListResponse[T All] struct {
	Elements []T `json:"elements"`
}

type Organization

type Organization struct {
	Name string `json:"name"`
	Id   string `json:"id"`
}

type OrganizationsClient

type OrganizationsClient struct {
	RESTClient[Organization]
}

func NewOrganizationsClient

func NewOrganizationsClient(rootDomain, token string) *OrganizationsClient

type RESTClient

type RESTClient[T All] struct {
	BaseUrl string
	Path    string
	Client  http.HttpClient
	Token   string
}

func (RESTClient[T]) Create

func (c RESTClient[T]) Create(entity T, overridePath ...string) (e T, err error)

func (RESTClient[T]) List

func (c RESTClient[T]) List() ([]T, error)

Jump to

Keyboard shortcuts

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