teamfolder

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MirrorGroupNamePrefix = "toolbox-teamfolder-mirror"
)

Variables

This section is empty.

Functions

func MarshalContext

func MarshalContext(c Context) (b []byte, err error)

Types

type Context

type Context interface {
	Pairs() (pairs []*MirrorPair)
	SetGroups(src, dst *mo_group.Group)
	SetAdmins(src, dst *mo_profile.Profile)
	GroupSrc() *mo_group.Group
	GroupDst() *mo_group.Group
	AdminSrc() *mo_profile.Profile
	AdminDst() *mo_profile.Profile
}

Mutable state of mirroring.

func UnmarshalContext

func UnmarshalContext(b []byte) (c Context, err error)

type MirrorOpt

type MirrorOpt func(opt *mirrorOpts) *mirrorOpts

func ArchiveOnSuccess

func ArchiveOnSuccess() MirrorOpt

func SkipVerify

func SkipVerify() MirrorOpt

type MirrorPair

type MirrorPair struct {
	Src *mo_teamfolder.TeamFolder
	Dst *mo_teamfolder.TeamFolder
}

type Replication

type Replication struct {
	TargetNames  []string
	TargetAll    bool
	Verification rp_model.RowReport
	Src          dbx_conn.ConnScopedTeam
	Dst          dbx_conn.ConnScopedTeam
}

func (*Replication) AllFolderScope

func (z *Replication) AllFolderScope() (ctx Context, err error)

func (*Replication) Archive

func (z *Replication) Archive(c app_control.Control, ctx Context, scope Scope) (err error)

func (*Replication) Bridge

func (z *Replication) Bridge(c app_control.Control, ctx Context) (err error)

func (*Replication) Cleanup

func (z *Replication) Cleanup(c app_control.Control, ctx Context) (err error)

func (*Replication) Content

func (z *Replication) Content(c app_control.Control, ctx Context, scope Scope) (err error)

func (*Replication) Exec

func (z *Replication) Exec(c app_control.Control) (err error)

func (*Replication) Inspect

func (z *Replication) Inspect(c app_control.Control, ctx Context) (err error)

func (*Replication) Mirror

func (z *Replication) Mirror(c app_control.Control, ctx Context, opts ...MirrorOpt) (err error)

func (*Replication) Mount

func (z *Replication) Mount(c app_control.Control, ctx Context, scope Scope) (err error)

func (*Replication) PartialScope

func (z *Replication) PartialScope(names []string) (ctx Context, err error)

func (*Replication) Preset

func (z *Replication) Preset()

func (*Replication) Test

func (z *Replication) Test(c app_control.Control) error

func (*Replication) Unmount

func (z *Replication) Unmount(c app_control.Control, ctx Context, scope Scope) (err error)

func (*Replication) Verify

func (z *Replication) Verify(c app_control.Control, ctx Context, scope Scope) (err error)

func (*Replication) VerifyScope

func (z *Replication) VerifyScope(c app_control.Control, ctx Context) (err error)

Verify scope

type Replicator

type Replicator interface {
	// All team folder scope
	AllFolderScope() (ctx Context, err error)

	// Specific team folders.
	PartialScope(names []string) (ctx Context, err error)

	// Mirror
	Mirror(ctx Context, opts ...MirrorOpt) (err error)

	// Inspect team folder.
	Inspect(ctx Context) (err error)

	// Create group to bridge permissions
	Bridge(ctx Context) (err error)

	// Mount, or create dest team folder if required.
	Mount(ctx Context, scope Scope) (err error)

	// Mirror contents
	Content(ctx Context, scope Scope) (err error)

	// Verify contents
	Verify(ctx Context, scope Scope) (err error)

	// Unmount
	Unmount(ctx Context, scope Scope) (err error)

	// Archive
	Archive(ctx Context, scope Scope) (err error)

	// Clean up permissions which used for mirroring
	Cleanup(ctx Context) (err error)

	// Verify scope
	VerifyScope(ctx Context) (err error)
}

type Scope

type Scope interface {
	Pair() (pair *MirrorPair)
}

func NewScope

func NewScope(pair *MirrorPair) Scope

Jump to

Keyboard shortcuts

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