tasks

package
v2.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2016 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Add

type Add struct{ Task }

Add should implement the add task

func (Add) Run

func (t Add) Run() (result string, err error)

Run Add adds a user using the public key and a token.

type Invalid

type Invalid struct{ Error error }

Invalid should implement the invalid task, i.e. take an error

func (Invalid) Run

func (t Invalid) Run() (result string, err error)

Run Invalid returns an error and empty result.

type Lease

type Lease struct{ Task }

Lease should implement the lease task

func (Lease) Run

func (t Lease) Run() (result string, err error)

Run Lease returns the users leases.

type Release

type Release struct{ Task }

Release should implement the release task

type Remove

type Remove struct{ Task }

Remove should implement the remove task

func (Remove) Run

func (t Remove) Run() (result string, err error)

Run Remove removes a user.

type Task

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

Task needs the arguments to use, and a database to save the changes to

func Init

func Init(argv []string, db *database.Database, admin *cjdns.Conn, clientIP net.IP, cidrs []lease.CIDR) (task Task, err error)

Init returns a new task

type TaskInterface

type TaskInterface interface {
	Run() (result string, err error)
}

TaskInterface defines the methods needed for a default task

Jump to

Keyboard shortcuts

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