private

package
v0.0.0-...-2608902 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2016 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func API2ID

func API2ID(tagStr string) (string, error)

API2ID converts the given tag string into a payload ID.

func API2Result

func API2Result(r PayloadResult) (payload.Result, error)

API2Result converts the API result to a payload.Result.

func IDs2ListArgs

func IDs2ListArgs(ids []string) params.Entities

IDs2ListArgs converts the provided payload IDs into arguments for the List API endpoint.

func IDs2UntrackArgs

func IDs2UntrackArgs(ids []string) params.Entities

IDs2UntrackArgs converts the provided payload IDs into arguments for the Untrack API endpoint.

Types

type LookUpArg

type LookUpArg struct {
	// Name is the payload name.
	Name string
	// ID uniquely identifies the payload for the given name.
	ID string
}

LookUpArg contains all the information necessary to identify a payload.

type LookUpArgs

type LookUpArgs struct {
	// Args is the list of arguments to pass to this function.
	Args []LookUpArg
}

LookUpArgs are the arguments for the LookUp endpoint.

func FullIDs2LookUpArgs

func FullIDs2LookUpArgs(fullIDs []string) LookUpArgs

FullIDs2LookUpArgs converts the provided payload "full" IDs into arguments for the LookUp API endpoint.

type PayloadResult

type PayloadResult struct {
	params.Entity
	// Payload holds the details of the payload, if any.
	Payload *api.Payload
	// NotFound indicates that the payload was not found in state.
	NotFound bool
	// Error is the error (if any) for the call referring to ID.
	Error *params.Error
}

PayloadResult contains the result for a single call.

func NewPayloadResult

func NewPayloadResult(id string, err error) PayloadResult

NewPayloadResult builds a new PayloadResult from the provided tag and error. NotFound is also set based on the error.

func Result2api

func Result2api(result payload.Result) PayloadResult

Result2api converts the payload.Result into a PayloadResult.

type PayloadResults

type PayloadResults struct {
	Results []PayloadResult
}

PayloadResults is the result for a call that makes one or more requests about payloads.

type SetStatusArg

type SetStatusArg struct {
	params.Entity
	// Status is the new status of the payload.
	Status string
}

SetStatusArg are the arguments for a single call to the SetStatus endpoint.

type SetStatusArgs

type SetStatusArgs struct {
	// Args is the list of arguments to pass to this function.
	Args []SetStatusArg
}

SetStatusArgs are the arguments for the SetStatus endpoint.

func IDs2SetStatusArgs

func IDs2SetStatusArgs(ids []string, status string) SetStatusArgs

IDs2SetStatusArgs converts the provided payload IDs into arguments for the SetStatus API endpoint.

type TrackArgs

type TrackArgs struct {
	// Payloads is the list of Payloads to track
	Payloads []api.Payload
}

TrackArgs are the arguments for the Track endpoint.

func Payloads2TrackArgs

func Payloads2TrackArgs(payloads []payload.Payload) TrackArgs

Payloads2TrackArgs converts the provided payload info into arguments for the Track API endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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