lib

package
v0.0.0-...-5ddb3d2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ErrListWarning is a warning that can occur while listing

Functions

This section is empty.

Types

type AccessMethods

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

AccessMethods is a group of methods for access control & user authentication

func (AccessMethods) Attributes

func (m AccessMethods) Attributes() map[string]AttributeSet

Attributes defines attributes for each method

func (AccessMethods) CreateAuthToken

func (m AccessMethods) CreateAuthToken(ctx context.Context, p *CreateAuthTokenParams) (string, error)

CreateAuthToken constructs a JWT string token suitable for making OAuth requests as the grantee user. Creating an access token requires a stored private key for the grantee. Callers can provide either granteeUsername OR granteeProfileID

func (AccessMethods) Name

func (m AccessMethods) Name() string

Name returns the name of this method group

type AnalyzeTransformParams

type AnalyzeTransformParams struct {
	ScriptFileName string `json:"scriptFileName"`
}

AnalyzeTransformParams are parameters for the analyzetransform command

func (*AnalyzeTransformParams) Validate

func (p *AnalyzeTransformParams) Validate() error

Validate ...

type AnalyzeTransformResult

type AnalyzeTransformResult struct {
	Diagnostics []staticlark.Diagnostic
}

AnalyzeTransformResult ...

type ApplyParams

type ApplyParams struct {
	Ref       string             `json:"ref"`
	Transform *dataset.Transform `json:"transform"`
	Secrets   map[string]string  `json:"secrets"`
	Wait      bool               `json:"wait"`
	// TODO(arqu): substitute with websockets when working over the wire
	ScriptOutput io.Writer `json:"-"`
	Hooks        []map[string]interface{}
	// size of the output area that the results will display on
	OutputWidth  int `json:"outputWidth"`
	OutputHeight int `json:"outputHeight"`
}

ApplyParams are parameters for the apply command

func (*ApplyParams) Validate

func (p *ApplyParams) Validate() error

Validate returns an error if ApplyParams fields are in an invalid state

type ApplyResult

type ApplyResult struct {
	Data  *dataset.Dataset
	RunID string `json:"runID"`
}

ApplyResult is the result of an apply command

type AutomationMethods

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

AutomationMethods groups together methods for automations

func (AutomationMethods) AnalyzeTransform

AnalyzeTransform ...

func (AutomationMethods) Apply

Apply runs a transform script

func (AutomationMethods) Attributes

func (m AutomationMethods) Attributes() map[string]AttributeSet

Attributes defines attributes for each method

func (AutomationMethods) Cancel

Cancel cancels the run for the given runID

func (AutomationMethods) Deploy

Deploy adds or updates a workflow

func (AutomationMethods) Name

func (m AutomationMethods) Name() string

Name returns the name of this method group

func (AutomationMethods) Remove

Remove removes a workflow

func (AutomationMethods) Run

Run manually runs a workflow

func (AutomationMethods) RunInfo

func (m AutomationMethods) RunInfo(ctx context.Context, p *RunInfoParams) (*run.State, error)

RunInfo fetches the full run info for a workflow run

func (AutomationMethods) Workflow

Workflow fetches a workflow

type CancelParams

type CancelParams struct {
	RunID string `json:"runID"`
}

CancelParams are parameters for the cancel command

func (*CancelParams) Validate

func (p *CancelParams) Validate() error

Validate returns an error if CancelParams fields are in an invalid state

type ChangeReport

type ChangeReport = changes.ChangeReportResponse

ChangeReport is a simple utility type declaration

type ChangeReportParams

type ChangeReportParams struct {
	LeftRef  string `schema:"leftRef" json:"leftRef"`
	RightRef string `schema:"rightRef" json:"rightRef"`
}

ChangeReportParams defines parameters for diffing two sources

type CollectionGetParams

type CollectionGetParams struct {
	Ref    string `json:"ref"`
	InitID string `json:"initID"`
}

CollectionGetParams defines parameters for looking up the head of a dataset from the collection

func (*CollectionGetParams) Validate

func (p *CollectionGetParams) Validate() error

Validate returns an error if CollectionGetParams fields are in an invalid state

type CollectionListParams

type CollectionListParams struct {
	params.List
	Username string `json:"username,omitempty"`
	Public   bool   `json:"public,omitempty"`
	Term     string `json:"term,omitempty"`
}

CollectionListParams defines parameters for listing a user's collection

func (*CollectionListParams) SetNonZeroDefaults

func (p *CollectionListParams) SetNonZeroDefaults()

SetNonZeroDefaults sets OrderBy to "created" if it's value is empty

type CollectionMethods

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

CollectionMethods lists a user's datasets. Datasets in a collection consist of datasets the user has created and other datasets the user has pulled.

Collections are local. The same user's collection on one affix node will often be different from another node, depending on what datasets have been created, pushed, or pulled to that node

func (CollectionMethods) Attributes

func (m CollectionMethods) Attributes() map[string]AttributeSet

Attributes defines attributes for each method

func (CollectionMethods) Get

Get gets the head of a dataset as a VersionInfo from the collection

func (CollectionMethods) List

List gets the reflist for either the local repo or a peer

func (CollectionMethods) ListRawRefs

func (m CollectionMethods) ListRawRefs(ctx context.Context, p *EmptyParams) (string, error)

ListRawRefs gets the list of raw references as string

func (CollectionMethods) Name

func (m CollectionMethods) Name() string

Name returns the name of this method group

type CreateAuthTokenParams

type CreateAuthTokenParams struct {
	// username to grant auth; e.g. "keyboard_cat"
	GranteeUsername string `json:"granteeUsername"`
	// profile Identifier to grant token for; e.g. "QmemJQrK7PTQvD3n8gmo9JhyaByyLmETiNR1Y8wS7hv4sP"
	GranteeProfileID string `json:"granteeProfileID"`
	// lifespan of token in nanoseconds; e.g. 2000000000000
	TTL time.Duration `json:"ttl"`
}

CreateAuthTokenParams are input parameters for Access().CreateAuthToken

func (*CreateAuthTokenParams) SetNonZeroDefaults

func (p *CreateAuthTokenParams) SetNonZeroDefaults()

SetNonZeroDefaults uses default token time-to-live if one isn't set

func (*CreateAuthTokenParams) Validate

func (p *CreateAuthTokenParams) Validate() error

Validate returns an error if input params are invalid

type DeployParams

type DeployParams struct {
	Run      bool // when Run is true, run the workflow after updating the dataset and workflow
	Workflow *workflow.Workflow
	Dataset  *dataset.Dataset
}

DeployParams are parameters for the deploy command

func (*DeployParams) Validate

func (p *DeployParams) Validate() error

Validate returns an error if DeployParams fields are in an invalid state

type RunInfoParams

type RunInfoParams struct {
	ID string `json:"id"`
}

RunInfoParams are parameters for the run info command

type RunParams

type RunParams struct {
	Ref        string `json:"ref"`
	InitID     string `json:"initID"`
	WorkflowID string `json:"workflowID"`
}

RunParams are parameters for the run command

func (*RunParams) Validate

func (p *RunParams) Validate() error

Validate returns an error if RunParams fields are in an invalid state

type WorkflowParams

type WorkflowParams struct {
	WorkflowID string `json:"workflowID"`
	InitID     string `json:"initID"`
	Ref        string `json:"ref"`
}

WorkflowParams are parameters for the Workflow command

func (*WorkflowParams) Validate

func (p *WorkflowParams) Validate() error

Validate returns an error if WorkflowParams fields are in an invalid state

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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