addon

package
v0.3.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Settings = &settings.Settings
	Log      = logr.WithName("addon")
)

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// Task API.
	Task
	// Log API.
	Log logapi.Logger
	// Settings API.
	Setting Setting
	// Application API.
	Application Application
	// Identity API.
	Identity Identity
	// Proxy API.
	Proxy Proxy
	// TagCategory API.
	TagCategory TagCategory
	// Tag API.
	Tag Tag
	// File API.
	File File
	// RuleSet API
	RuleSet RuleSet
	// contains filtered or unexported fields
}

The Adapter provides hub/addon integration.

var Addon *Adapter

Addon An addon adapter configured for a task execution.

func (*Adapter) Run

func (h *Adapter) Run(addon func() error)

Run addon. Reports:

  • Started
  • Succeeded
  • Failed (when addon returns error).

type Application

type Application = binding.Application

Handler

type Bucket

type Bucket = binding.Bucket

type BucketContent added in v0.3.0

type BucketContent = binding.BucketContent

type Client

type Client = binding.Client

Client

type Conflict

type Conflict = binding.Conflict

type File added in v0.1.0

type File = binding.File

type Filter added in v0.3.0

type Filter = binding.Filter

Filter

type Identity

type Identity = binding.Identity

type NotFound

type NotFound = binding.NotFound

type Param

type Param = binding.Param

type Params

type Params = binding.Params

type Path added in v0.1.0

type Path = binding.Path

type Proxy

type Proxy = binding.Proxy

type ResetError added in v0.3.0

type ResetError = binding.RestError

Error

type RuleSet added in v0.2.0

type RuleSet = binding.RuleSet

type Setting

type Setting = binding.Setting

type SoftError

type SoftError struct {
	Reason string
}

SoftError A "soft" anticipated error. Deprecated:

func (*SoftError) Error

func (e *SoftError) Error() (s string)

func (*SoftError) Is

func (e *SoftError) Is(err error) (matched bool)

func (*SoftError) Soft

func (e *SoftError) Soft() *SoftError

type Tag

type Tag = binding.Tag

type TagCategory added in v0.1.0

type TagCategory = binding.TagCategory

type Task

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

Task API.

func (*Task) Activity

func (h *Task) Activity(entry string, v ...interface{})

Activity report addon activity. The description can be a printf style format.

func (*Task) Application

func (h *Task) Application() (r *api.Application, err error)

Application returns the application associated with the task.

func (*Task) Bucket

func (h *Task) Bucket() (b *binding.BucketContent)

Bucket returns the bucket API.

func (*Task) Completed

func (h *Task) Completed(n int)

Completed report addon completed (N) items.

func (*Task) Data

func (h *Task) Data() (d map[string]interface{})

Data returns the addon data.

func (*Task) DataWith

func (h *Task) DataWith(object interface{}) (err error)

DataWith populates the addon data object.

func (*Task) Error added in v0.3.0

func (h *Task) Error(error ...api.TaskError)

Error report addon error.

func (*Task) Errorf added in v0.3.0

func (h *Task) Errorf(severity, description string, v ...interface{})

Errorf report addon error.

func (*Task) Failed

func (h *Task) Failed(reason string, v ...interface{})

Failed report addon failed. The reason can be a printf style format.

func (*Task) Increment

func (h *Task) Increment()

Increment report addon completed (+1) items.

func (*Task) Load

func (h *Task) Load()

Load a task by ID.

func (*Task) Result

func (h *Task) Result(object interface{})

Result report addon result.

func (*Task) Started

func (h *Task) Started()

Started report addon started.

func (*Task) Succeeded

func (h *Task) Succeeded()

Succeeded report addon succeeded.

func (*Task) Total

func (h *Task) Total(n int)

Total report addon total items.

func (*Task) Variant

func (h *Task) Variant() string

Variant returns the task variant.

Jump to

Keyboard shortcuts

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