common

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CallTrigger process & source Plugin
	CallTrigger = "trigger"

	// CallListEntries and other Entry call is needed by mirror Plugin
	CallListEntries = "listEntries"
	CallAddEntry    = "addEntry"
	CallUpdateEntry = "updateEntry"
	CallDeleteEntry = "deleteEntry"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface {
	Name() string
	IsGroup() bool
	SubEntries() []Entry
	OpenReader() (io.ReadCloser, error)
}

func NewFileEntry

func NewFileEntry(name string, content []byte) Entry

func NewGroupEntry

func NewGroupEntry(name string) Entry

type FileEntry

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

func (*FileEntry) IsGroup

func (f *FileEntry) IsGroup() bool

func (*FileEntry) Name

func (f *FileEntry) Name() string

func (*FileEntry) OpenReader

func (f *FileEntry) OpenReader() (io.ReadCloser, error)

func (*FileEntry) OpenWrite

func (f *FileEntry) OpenWrite() (io.WriteCloser, error)

func (*FileEntry) SubEntries

func (f *FileEntry) SubEntries() []Entry

type GroupEntry

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

func (*GroupEntry) DeleteEntries

func (g *GroupEntry) DeleteEntries(entries ...Entry) error

func (*GroupEntry) IsGroup

func (g *GroupEntry) IsGroup() bool

func (*GroupEntry) Name

func (g *GroupEntry) Name() string

func (*GroupEntry) NewEntries

func (g *GroupEntry) NewEntries(entries ...Entry) error

func (*GroupEntry) OpenReader

func (g *GroupEntry) OpenReader() (io.ReadCloser, error)

func (*GroupEntry) SubEntries

func (g *GroupEntry) SubEntries() []Entry

type Request

type Request struct {
	CallType string
	WorkPath string
	Entry    Entry
}

func NewRequest

func NewRequest() *Request

type Response

type Response struct {
	IsSucceed bool
	Entries   []Entry
}

func NewResponse

func NewResponse() *Response

Jump to

Keyboard shortcuts

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