model

package
v0.0.0-...-a7b91b5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy struct {
	ID                        int64           `json:"id"`
	Name                      string          `json:"name"`
	Description               string          `json:"description"`
	Creator                   string          `json:"creator"`
	SrcRegistry               *model.Registry `json:"src_registry"`
	DestRegistry              *model.Registry `json:"dest_registry"`
	DestNamespace             string          `json:"dest_namespace"`
	DestNamespaceReplaceCount int8            `json:"dest_namespace_replace_count"`
	Filters                   []*model.Filter `json:"filters"`
	Trigger                   *model.Trigger  `json:"trigger"`
	ReplicateDeletion         bool            `json:"deletion"`
	Override                  bool            `json:"override"`
	Enabled                   bool            `json:"enabled"`
	CreationTime              time.Time       `json:"creation_time"`
	UpdateTime                time.Time       `json:"update_time"`
	Speed                     int32           `json:"speed"`
	CopyByChunk               bool            `json:"copy_by_chunk"`
}

Policy defines the structure of a replication policy

func (*Policy) From

func (p *Policy) From(policy *replicationmodel.Policy) error

From converts the pkg model into the Policy

func (*Policy) IsScheduledTrigger

func (p *Policy) IsScheduledTrigger() bool

IsScheduledTrigger returns true when the policy is scheduled trigger and enabled

func (*Policy) To

func (p *Policy) To() (*replicationmodel.Policy, error)

To converts to pkg model

func (*Policy) Validate

func (p *Policy) Validate() error

Validate the policy

Jump to

Keyboard shortcuts

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