manager

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: AGPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages nexus scripting

func New

func New(url string, username string, password string) *Manager

New creates a new nexus script manager

func (*Manager) Create

func (manager *Manager) Create(name string, script string) (*Script, error)

Create creates a new script at nexus

func (*Manager) CreateFromFile

func (manager *Manager) CreateFromFile(name string, filename string) (*Script, error)

CreateFromFile creates a new script at nexus with the content from the given file

func (*Manager) Exists

func (manager *Manager) Exists(name string) (bool, error)

Exists returns true if a script exists with the given name

func (*Manager) Get

func (manager *Manager) Get(name string) (*Script, error)

Get returns a script instance of the given name

func (*Manager) WithTimeout

func (manager *Manager) WithTimeout(timeoutInSeconds int)

type Script

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

Script represents a nexus script

func (*Script) Execute

func (script *Script) Execute(reader io.Reader) (string, error)

Execute executes the script with the given payload

func (*Script) ExecuteWithFilePayload

func (script *Script) ExecuteWithFilePayload(filename string) (string, error)

ExecuteWithFilePayload execute the script with the payload from given file

func (*Script) ExecuteWithJSONPayload

func (script *Script) ExecuteWithJSONPayload(payload interface{}) (string, error)

ExecuteWithJSONPayload execute the script with the given payload transformed to json

func (*Script) ExecuteWithStringPayload

func (script *Script) ExecuteWithStringPayload(payload string) (string, error)

ExecuteWithStringPayload

func (*Script) ExecuteWithoutPayload

func (script *Script) ExecuteWithoutPayload() (string, error)

ExecuteWithoutPayload executes the script without any payload

Jump to

Keyboard shortcuts

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