api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUserAgent = "go-structurizr/" + version.LibraryVersion
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the main Client API interface. Use NewClient to get started

func NewClient

func NewClient(config *Config) *Client

NewClient returns an API Client used to communicate with the remote server

func (*Client) CreateWorkspace

func (c *Client) CreateWorkspace(ctx context.Context) (*model.Workspace, error)

CreateWorkspace creates a new workspace

func (*Client) DeleteWorkspace

func (c *Client) DeleteWorkspace(ctx context.Context, id int64) (*model.APIResponse, error)

DeleteWorkspace deletes a workspace

func (*Client) GetWorkspaces

func (c *Client) GetWorkspaces(ctx context.Context) (*model.Workspaces, error)

GetWorkspaces lists all workspaces

type Config

type Config struct {
	AdminAPIKey string
	BaseURL     *url.URL
	TLSInsecure bool
	UserAgent   string
}

Config is the primary means to modify the Client

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

Doer an interface that enables a more flexible dependency injection

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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