cli

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

This section is empty.

Variables

View Source
var DefaultCmdExec = &cmdExecutor{}

DefaultCmdExec is the default cmdExecutor.

Functions

func WorkingDir

func WorkingDir(ctx context.Context) (string, error)

WorkingDir extracts the embedded Structurizr CLI files to a working directory for easier utilization.

Types

type Client

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

Client is the main Structurizr CLI Use NewClient to get started

func NewClient

func NewClient(config *Config, executor CmdExec) *Client

NewClient creates a new Structurizr CLI with sensible but overridable defaults

func (*Client) PushWorkspace

func (c *Client) PushWorkspace(
	ctx context.Context,
	id int64,
	key string,
	secret string,
	passphrase string,
	source string,
) error

PushWorkspace push a new version of a workspace from an existing file

type CmdExec

type CmdExec interface {
	CombinedOutput(ctx context.Context, name string, arg ...string) ([]byte, error)
}

CmdExec is an interface for executing commands

type Config

type Config struct {
	BaseURL    *url.URL
	WorkingDir string
	// contains filtered or unexported fields
}

Config is the primary means to modify the Client

Jump to

Keyboard shortcuts

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