client

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LambdaAPIClient

type LambdaAPIClient struct {
	BaseURL string
	// contains filtered or unexported fields
}

func DefaultLambdaAPI

func DefaultLambdaAPI() *LambdaAPIClient

func (*LambdaAPIClient) Actions

func (impl *LambdaAPIClient) Actions(ctx context.Context, token *api.Token, uid string) (reply []string, err error)

Actions available for the app

func (*LambdaAPIClient) CreateFile

func (impl *LambdaAPIClient) CreateFile(ctx context.Context, token *api.Token, uid string, path string, dir bool) (reply bool, err error)

Create file or directory inside app

func (*LambdaAPIClient) Download

func (impl *LambdaAPIClient) Download(ctx context.Context, token *api.Token, uid string) (reply []byte, err error)

Download content as .tar.gz archive from app

func (*LambdaAPIClient) Files

func (impl *LambdaAPIClient) Files(ctx context.Context, token *api.Token, uid string, dir string) (reply []types.File, err error)

Files in func dir

func (*LambdaAPIClient) Info

func (impl *LambdaAPIClient) Info(ctx context.Context, token *api.Token, uid string) (reply *application.Definition, err error)

Info about application

func (*LambdaAPIClient) Invoke

func (impl *LambdaAPIClient) Invoke(ctx context.Context, token *api.Token, uid string, action string) (reply string, err error)

Invoke action in the app (if make installed)

func (impl *LambdaAPIClient) Link(ctx context.Context, token *api.Token, uid string, alias string) (reply *application.Definition, err error)

Make link/alias for app

func (*LambdaAPIClient) Pull

func (impl *LambdaAPIClient) Pull(ctx context.Context, token *api.Token, uid string, file string) (reply []byte, err error)

Pull single file from app

func (*LambdaAPIClient) Push

func (impl *LambdaAPIClient) Push(ctx context.Context, token *api.Token, uid string, file string, content []byte) (reply bool, err error)

Push single file to app

func (*LambdaAPIClient) Remove

func (impl *LambdaAPIClient) Remove(ctx context.Context, token *api.Token, uid string) (reply bool, err error)

Remove app and call Uninstall handler (if defined)

func (*LambdaAPIClient) RemoveFile

func (impl *LambdaAPIClient) RemoveFile(ctx context.Context, token *api.Token, uid string, path string) (reply bool, err error)

Remove file or directory

func (*LambdaAPIClient) RenameFile

func (impl *LambdaAPIClient) RenameFile(ctx context.Context, token *api.Token, uid string, oldPath string, newPath string) (reply bool, err error)

Rename file or directory

func (*LambdaAPIClient) Stats

func (impl *LambdaAPIClient) Stats(ctx context.Context, token *api.Token, uid string, limit int) (reply []stats.Record, err error)

Stats for the app

func (impl *LambdaAPIClient) Unlink(ctx context.Context, token *api.Token, alias string) (reply *application.Definition, err error)

Remove link

func (*LambdaAPIClient) Update

func (impl *LambdaAPIClient) Update(ctx context.Context, token *api.Token, uid string, manifest types.Manifest) (reply *application.Definition, err error)

Update application manifest

func (*LambdaAPIClient) Upload

func (impl *LambdaAPIClient) Upload(ctx context.Context, token *api.Token, uid string, tarGz []byte) (reply bool, err error)

Upload content from .tar.gz archive to app and call Install handler (if defined)

type PoliciesAPIClient added in v0.3.5

type PoliciesAPIClient struct {
	BaseURL string
	// contains filtered or unexported fields
}

func DefaultPoliciesAPI added in v0.3.5

func DefaultPoliciesAPI() *PoliciesAPIClient

func (*PoliciesAPIClient) Apply added in v0.3.5

func (impl *PoliciesAPIClient) Apply(ctx context.Context, token *api.Token, lambda string, policy string) (reply bool, err error)

Apply policy for the resource

func (*PoliciesAPIClient) Clear added in v0.3.5

func (impl *PoliciesAPIClient) Clear(ctx context.Context, token *api.Token, lambda string) (reply bool, err error)

Clear applied policy for the lambda

func (*PoliciesAPIClient) Create added in v0.3.5

func (impl *PoliciesAPIClient) Create(ctx context.Context, token *api.Token, policy string, definition application.PolicyDefinition) (reply *application.Policy, err error)

Create new policy

func (*PoliciesAPIClient) List added in v0.3.5

func (impl *PoliciesAPIClient) List(ctx context.Context, token *api.Token) (reply []application.Policy, err error)

List all policies

func (*PoliciesAPIClient) Remove added in v0.3.5

func (impl *PoliciesAPIClient) Remove(ctx context.Context, token *api.Token, policy string) (reply bool, err error)

Remove policy

func (*PoliciesAPIClient) Update added in v0.3.5

func (impl *PoliciesAPIClient) Update(ctx context.Context, token *api.Token, policy string, definition application.PolicyDefinition) (reply bool, err error)

Update policy definition

type ProjectAPIClient

type ProjectAPIClient struct {
	BaseURL string
	// contains filtered or unexported fields
}

func DefaultProjectAPI

func DefaultProjectAPI() *ProjectAPIClient

func (*ProjectAPIClient) AllTemplates

func (impl *ProjectAPIClient) AllTemplates(ctx context.Context, token *api.Token) (reply []*api.TemplateStatus, err error)

Get all templates without filtering

func (*ProjectAPIClient) Config

func (impl *ProjectAPIClient) Config(ctx context.Context, token *api.Token) (reply *api.Settings, err error)

Get global configuration

func (*ProjectAPIClient) Create

func (impl *ProjectAPIClient) Create(ctx context.Context, token *api.Token) (reply *application.Definition, err error)

Create new app (lambda)

func (*ProjectAPIClient) CreateFromGit

func (impl *ProjectAPIClient) CreateFromGit(ctx context.Context, token *api.Token, repo string) (reply *application.Definition, err error)

Create new app/lambda/function using remote Git repo

func (*ProjectAPIClient) CreateFromTemplate

func (impl *ProjectAPIClient) CreateFromTemplate(ctx context.Context, token *api.Token, templateName string) (reply *application.Definition, err error)

Create new app/lambda/function using pre-defined template

func (*ProjectAPIClient) List

func (impl *ProjectAPIClient) List(ctx context.Context, token *api.Token) (reply []application.Definition, err error)

List available apps (lambdas) in a project

func (*ProjectAPIClient) SetEnvironment

func (impl *ProjectAPIClient) SetEnvironment(ctx context.Context, token *api.Token, env api.Environment) (reply *api.Settings, err error)

Change global environment

func (*ProjectAPIClient) SetUser

func (impl *ProjectAPIClient) SetUser(ctx context.Context, token *api.Token, user string) (reply *api.Settings, err error)

Change effective user

func (*ProjectAPIClient) Stats

func (impl *ProjectAPIClient) Stats(ctx context.Context, token *api.Token, limit int) (reply []stats.Record, err error)

Global last records

func (*ProjectAPIClient) Templates

func (impl *ProjectAPIClient) Templates(ctx context.Context, token *api.Token) (reply []*api.Template, err error)

Templates with filter by availability including embedded

type QueuesAPIClient added in v0.3.5

type QueuesAPIClient struct {
	BaseURL string
	// contains filtered or unexported fields
}

func DefaultQueuesAPI added in v0.3.5

func DefaultQueuesAPI() *QueuesAPIClient

func (*QueuesAPIClient) Assign added in v0.3.5

func (impl *QueuesAPIClient) Assign(ctx context.Context, token *api.Token, name string, lambda string) (reply bool, err error)

Assign lambda to queue (re-link)

func (*QueuesAPIClient) Create added in v0.3.5

func (impl *QueuesAPIClient) Create(ctx context.Context, token *api.Token, queue application.Queue) (reply *application.Queue, err error)

Create queue and link it to lambda and start worker

func (*QueuesAPIClient) Linked added in v0.3.5

func (impl *QueuesAPIClient) Linked(ctx context.Context, token *api.Token, lambda string) (reply []application.Queue, err error)

Linked queues for lambda

func (*QueuesAPIClient) List added in v0.3.5

func (impl *QueuesAPIClient) List(ctx context.Context, token *api.Token) (reply []application.Queue, err error)

List of all queues

func (*QueuesAPIClient) Remove added in v0.3.5

func (impl *QueuesAPIClient) Remove(ctx context.Context, token *api.Token, name string) (reply bool, err error)

Remove queue and stop worker

type UserAPIClient

type UserAPIClient struct {
	BaseURL string
	// contains filtered or unexported fields
}

func DefaultUserAPI

func DefaultUserAPI() *UserAPIClient

func (*UserAPIClient) ChangePassword

func (impl *UserAPIClient) ChangePassword(ctx context.Context, token *api.Token, password string) (reply bool, err error)

Change password for the user

func (*UserAPIClient) Login

func (impl *UserAPIClient) Login(ctx context.Context, login string, password string) (reply *api.Token, err error)

Login user by username and password. Returns signed JWT

Jump to

Keyboard shortcuts

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