manager

package
v0.0.0-...-c4175cc Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION_FILE = "VERSION"
	AUTHORS_FILE = "AUTHORS"
)
View Source
const ConfigDumpInfoFileName = "ConfigDumpInfo.xml"

Variables

This section is empty.

Functions

func CommitVersionFile

func CommitVersionFile(workdir string) error

func CopyDir

func CopyDir(src string, dst string) (err error)

CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, Symlinks are ignored and skipped.

func CopyFile

func CopyFile(src, dst string) (err error)

func DoTask

func DoTask(t Task, subscribeManager *subscription.SubscribeManager) (err error)

func Exists

func Exists(name string) (bool, error)

func Init

func Init(r SyncRepository, options Options) error

func IsNoExist

func IsNoExist(name string) (bool, error)

func NewAuthor

func NewAuthor(name, email string) types.RepositoryAuthor

func Sync

func Sync(r SyncRepository, options Options) error

Types

type ClearWorkdir

type ClearWorkdir struct {
	V8end     V8Endpoint
	Workdir   string
	TempDir   string
	SkipFiles []string
}

func (ClearWorkdir) Action

func (t ClearWorkdir) Action(useStdHandler bool) (err error)

func (ClearWorkdir) After

func (ClearWorkdir) Before

func (ClearWorkdir) On

type CommitFiles

type CommitFiles struct {
	V8end   V8Endpoint
	Workdir string
	Author  types.RepositoryAuthor
	Date    time.Time
	Comment string
}

func (CommitFiles) Action

func (t CommitFiles) Action(useStdHandler bool) (err error)

func (CommitFiles) After

func (CommitFiles) Before

func (CommitFiles) On

type ConfigureRepositoryVersions

type ConfigureRepositoryVersions struct {
	V8end               V8Endpoint
	Versions            *types.RepositoryVersionsList
	NBegin, NNext, NMax *int
}

func (ConfigureRepositoryVersions) Action

func (t ConfigureRepositoryVersions) Action(useStdHandler bool) error

func (ConfigureRepositoryVersions) After

func (ConfigureRepositoryVersions) Before

func (ConfigureRepositoryVersions) On

type DumpConfigToFiles

type DumpConfigToFiles struct {
	V8end         V8Endpoint
	WorkDir       string
	TempDir       string
	Number        int
	Increment     bool
	IsIncremented *bool
}

func (DumpConfigToFiles) Action

func (t DumpConfigToFiles) Action(useStdHandler bool) error

func (DumpConfigToFiles) After

func (DumpConfigToFiles) Before

func (DumpConfigToFiles) On

func (t DumpConfigToFiles) On(pm *subscription.SubscribeManager, useStdHandler *bool) error

type FinishSyncProcess

type FinishSyncProcess struct {
	V8end   V8Endpoint
	WorkDir string
	Err     *error
}

func (FinishSyncProcess) Action

func (t FinishSyncProcess) Action(_ bool) error

func (FinishSyncProcess) After

func (FinishSyncProcess) Before

func (FinishSyncProcess) On

type FinishSyncVersion

type FinishSyncVersion struct {
	V8end   V8Endpoint
	WorkDir string
	TempDir string
	Number  int
	Err     *error
}

func (FinishSyncVersion) Action

func (t FinishSyncVersion) Action(_ bool) error

func (FinishSyncVersion) After

func (FinishSyncVersion) Before

func (FinishSyncVersion) On

type Flow

type Flow struct {
	SubscribeManager *subscription.SubscribeManager
}

func (Flow) ClearWorkDir

func (t Flow) ClearWorkDir(v8end types.V8Endpoint, dir string, temp string, skipFiles []string) error

func (Flow) CommitFiles

func (t Flow) CommitFiles(v8end types.V8Endpoint, dir string, author types.RepositoryAuthor, when time.Time, comment string) error

func (Flow) ConfigureRepositoryVersions

func (t Flow) ConfigureRepositoryVersions(v8end types.V8Endpoint, versions *types.RepositoryVersionsList, NCurrent, NNext, NMax *int) (err error)

func (Flow) DumpConfigToFiles

func (t Flow) DumpConfigToFiles(v8end types.V8Endpoint, dir string, temp string, number int, update bool) (bool, error)

func (Flow) FinishSyncProcess

func (t Flow) FinishSyncProcess(v8end types.V8Endpoint, dir string, err *error)

func (Flow) FinishSyncVersion

func (t Flow) FinishSyncVersion(v8end types.V8Endpoint, workdir string, tempdir string, number int, err *error)

func (Flow) GetRepositoryAuthors

func (t Flow) GetRepositoryAuthors(v8end types.V8Endpoint, dir string, filename string, authors *types.RepositoryAuthorsList) error

func (Flow) GetRepositoryVersions

func (t Flow) GetRepositoryVersions(v8end types.V8Endpoint, dir string, NBegin, NEnd int, list *types.RepositoryVersionsList) error

func (Flow) MoveToWorkDir

func (t Flow) MoveToWorkDir(v8end types.V8Endpoint, dir string, temp string) error

func (Flow) ReadVersionFile

func (t Flow) ReadVersionFile(v8end types.V8Endpoint, dir string, filename string) (int, error)

func (Flow) StartSyncProcess

func (t Flow) StartSyncProcess(v8end types.V8Endpoint, dir string)

func (Flow) StartSyncVersion

func (t Flow) StartSyncVersion(v8end types.V8Endpoint, workdir string, tempdir string, number int)

func (Flow) Task

func (f Flow) Task(task Task) error

func (Flow) UpdateCfg

func (t Flow) UpdateCfg(v8end types.V8Endpoint, workDir string, number int) error

func (Flow) WriteVersionFile

func (t Flow) WriteVersionFile(v8end types.V8Endpoint, dir string, number int, filename string) error

type GetRepositoryAuthors

type GetRepositoryAuthors struct {
	V8end    V8Endpoint
	Workdir  string
	Filename string
	Authors  *types.RepositoryAuthorsList
}

func (GetRepositoryAuthors) Action

func (t GetRepositoryAuthors) Action(useStdHandler bool) (err error)

func (GetRepositoryAuthors) After

func (GetRepositoryAuthors) Before

func (GetRepositoryAuthors) On

type GetRepositoryVersions

type GetRepositoryVersions struct {
	V8end        V8Endpoint
	Workdir      string
	NBegin, NEnd int
	Versions     *types.RepositoryVersionsList
}

func (GetRepositoryVersions) Action

func (t GetRepositoryVersions) Action(useStdHandler bool) (err error)

func (GetRepositoryVersions) After

func (GetRepositoryVersions) Before

func (GetRepositoryVersions) On

type MoveToWorkdir

type MoveToWorkdir struct {
	V8end   V8Endpoint
	Workdir string
	TempDir string
}

func (MoveToWorkdir) Action

func (t MoveToWorkdir) Action(useStdHandler bool) (err error)

func (MoveToWorkdir) After

func (MoveToWorkdir) Before

func (MoveToWorkdir) On

type Option

type Option func(*Options)

type Options

type Options struct {
	TempDir          string
	DisableIncrement bool

	MinVersion       int
	MaxVersion       int
	LimitVersions    int
	InfobaseConnect  string
	InfobaseUser     string
	InfobasePassword string
	DomainEmail      string

	V8Path    string
	V8version string

	Plugins *subscription.SubscribeManager

	LicTryCount int
	// contains filtered or unexported fields
}

func (*Options) Infobase

func (o *Options) Infobase() (*v8.Infobase, error)

func (*Options) Options

func (o *Options) Options() []interface{}

type ReadVersionFile

type ReadVersionFile struct {
	V8end    V8Endpoint
	Workdir  string
	Filename string
	Version  *int
}

func (ReadVersionFile) Action

func (t ReadVersionFile) Action(useStdHandler bool) (err error)

func (ReadVersionFile) After

func (ReadVersionFile) Before

func (ReadVersionFile) On

type StartSyncProcess

type StartSyncProcess struct {
	V8end   V8Endpoint
	WorkDir string
}

func (StartSyncProcess) Action

func (t StartSyncProcess) Action(useStdHandler bool) error

func (StartSyncProcess) After

func (StartSyncProcess) Before

func (StartSyncProcess) On

type StartSyncVersion

type StartSyncVersion struct {
	V8end   V8Endpoint
	WorkDir string
	TempDir string
	Number  int
}

func (StartSyncVersion) Action

func (t StartSyncVersion) Action(useStdHandler bool) error

func (StartSyncVersion) After

func (StartSyncVersion) Before

func (StartSyncVersion) On

type SyncRepository

type SyncRepository struct {
	designer.Repository
	Name    string
	Workdir string
}

func (*SyncRepository) Init

func (r *SyncRepository) Init(options Options) error

func (*SyncRepository) Sync

func (r *SyncRepository) Sync(options Options) error

type Task

type Task interface {
	Action(useStdHandler bool) error
	Before(pm *subscription.SubscribeManager) error
	On(pm *subscription.SubscribeManager, useStdHandler *bool) error
	After(pm *subscription.SubscribeManager) error
}

type UpdateCfg

type UpdateCfg struct {
	V8end   V8Endpoint
	WorkDir string
	Number  int
}

func (UpdateCfg) Action

func (t UpdateCfg) Action(useStdHandler bool) error

func (UpdateCfg) After

func (UpdateCfg) Before

func (UpdateCfg) On

func (t UpdateCfg) On(pm *subscription.SubscribeManager, useStdHandler *bool) error

type V8Endpoint

type V8Endpoint interface {
	Infobase() *v8.Infobase
	Repository() *designer.Repository
	Extention() string
	Options() []interface{}
}

type WriteVersionFile

type WriteVersionFile struct {
	V8end    V8Endpoint
	Workdir  string
	Filename string
	Version  int
}

func (WriteVersionFile) Action

func (t WriteVersionFile) Action(useStdHandler bool) (err error)

func (WriteVersionFile) After

func (WriteVersionFile) Before

func (WriteVersionFile) On

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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