tasks

package
v0.0.2-0...-83fa1ee Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TASK_TYPE_DELETE = "delete"
	TASK_TYPE_COPY   = "copy"
	TASK_TYPE_MOVE   = "move"
	TASK_TYPE_RENAME = "rename"
	TASK_TYPE_SYNC   = "sync"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyArgs

type CopyArgs struct {
	TaskArgs
	Destination string `json:"destination"`
}

func (*CopyArgs) GetArgs

func (c *CopyArgs) GetArgs() interface{}

type IArgable

type IArgable interface {
	GetArgs() interface{}
}

type MoveArgs

type MoveArgs struct {
	TaskArgs
	Destination string `json:"destination"`
}

func (*MoveArgs) GetArgs

func (m *MoveArgs) GetArgs() interface{}

type RenameArgs

type RenameArgs struct {
	TaskArgs
	Prefix    string `json:"prefix"`
	Extension string `json:"extension"`
}

func (*RenameArgs) GetArgs

func (r *RenameArgs) GetArgs() interface{}

type SyncArgs

type SyncArgs struct {
	TaskArgs
	Destination string `json:"destination"`
	Delete      bool   `json:"delete"`
	Destructive bool   `json:"destructive"`
}

func (*SyncArgs) GetArgs

func (s *SyncArgs) GetArgs() interface{}

type TASK_TYPE

type TASK_TYPE string

type Task

type Task struct {
	Id          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Type        TASK_TYPE `json:"type"`
	Args        IArgable  `json:"args"`
}

func NewTask

func NewTask(id uuid.UUID, name string, description string, t TASK_TYPE) *Task

func (*Task) GetArgs

func (t *Task) GetArgs() interface{}

func (*Task) GetDescription

func (t *Task) GetDescription() string

func (*Task) GetId

func (t *Task) GetId() uuid.UUID

func (*Task) GetName

func (t *Task) GetName() string

func (*Task) GetType

func (t *Task) GetType() TASK_TYPE

type TaskArgs

type TaskArgs struct {
	Source    string `json:"source"`
	Include   string `json:"include"`
	Exclude   string `json:"exclude"`
	Recursive bool   `json:"recursive"`
	Force     bool   `json:"force"`
}

Jump to

Keyboard shortcuts

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