enterpriseclient

package
v0.73.4 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePayload added in v0.28.0

func ValidatePayload(pubkey ssh.PublicKey, sigString, fingerprintSigString string, data []byte) (bool, []byte, error)

ValidatePayload checks that the payload was signed by the private key associated with the provided public key if fingerprintSigString is not empty, sigString is ignored and it is used instead, and the nonce will be returned if the signature was valid

Types

type HTTPClient

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

An HTTPClient communicates with the Replicated Enterprise HTTP API.

func New

func New(privateKeyContents []byte) *HTTPClient

New returns a new HTTP client.

func NewHTTPClient

func NewHTTPClient(origin string, privateKeyContents []byte) *HTTPClient

func (HTTPClient) AssignChannel added in v0.24.0

func (c HTTPClient) AssignChannel(channelID string, teamID string) error

func (HTTPClient) AssignInstaller added in v0.23.0

func (c HTTPClient) AssignInstaller(installerID string, channelID string) error

func (HTTPClient) AssignPolicy

func (c HTTPClient) AssignPolicy(policyID string, channelID string) error

func (HTTPClient) AuthApprove added in v0.24.0

func (c HTTPClient) AuthApprove(fingerprint string) error

func (HTTPClient) AuthInit

func (c HTTPClient) AuthInit(organizationName string) error

func (HTTPClient) CreateChannel

func (c HTTPClient) CreateChannel(name string, description string) (*enterprisetypes.Channel, error)

func (HTTPClient) CreateInstaller added in v0.23.0

func (c HTTPClient) CreateInstaller(yaml string) (*enterprisetypes.Installer, error)

func (HTTPClient) CreatePolicy

func (c HTTPClient) CreatePolicy(name string, description string, policy string) (*enterprisetypes.Policy, error)

func (HTTPClient) ListChannels

func (c HTTPClient) ListChannels() ([]*enterprisetypes.Channel, error)

func (HTTPClient) ListInstallers added in v0.23.0

func (c HTTPClient) ListInstallers() ([]*enterprisetypes.Installer, error)

func (HTTPClient) ListPolicies

func (c HTTPClient) ListPolicies() ([]*enterprisetypes.Policy, error)

func (HTTPClient) RemoveChannel added in v0.23.0

func (c HTTPClient) RemoveChannel(id string) error

func (HTTPClient) RemoveInstaller added in v0.23.0

func (c HTTPClient) RemoveInstaller(id string) error

func (HTTPClient) RemovePolicy

func (c HTTPClient) RemovePolicy(id string) error

func (HTTPClient) UnassignPolicy

func (c HTTPClient) UnassignPolicy(policyID string, channelID string) error

func (HTTPClient) UpdateChannel added in v0.23.0

func (c HTTPClient) UpdateChannel(id string, name string, description string) (*enterprisetypes.Channel, error)

func (HTTPClient) UpdateInstaller added in v0.23.0

func (c HTTPClient) UpdateInstaller(id string, yaml string) (*enterprisetypes.Installer, error)

func (HTTPClient) UpdatePolicy added in v0.23.0

func (c HTTPClient) UpdatePolicy(id string, name string, description string, policy string) (*enterprisetypes.Policy, error)

type SigBlock added in v0.28.0

type SigBlock struct {
	Nonce     []byte
	Timestamp []byte
	Signature []byte
}

Jump to

Keyboard shortcuts

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