Documentation ¶
Index ¶
- Variables
- func NewArchiveRepoCompletedError(repoId uuid.I, workflowId uuid.I, code int32) pb.RegistryEvent
- func NewArchiveRepoCompletedOk(repoId uuid.I, workflowId uuid.I) pb.RegistryEvent
- func NewArchiveRepoStarted(repoId uuid.I, workflowId uuid.I) pb.RegistryEvent
- func NewEphemeralWorkflowsEnabled(ephemeralWorkflowsId uuid.I) pb.RegistryEvent
- func NewFreezeRepoCompleted2Error(repoId uuid.I, workflowId uuid.I, code int32) pb.RegistryEvent
- func NewFreezeRepoCompleted2Ok(repoId uuid.I, workflowId uuid.I) pb.RegistryEvent
- func NewFreezeRepoStarted2(repoId uuid.I, workflowId uuid.I) pb.RegistryEvent
- func NewPathFlagSet(path string, flags uint32) pb.RegistryEvent
- func NewPathFlagUnset(path string, flags uint32) pb.RegistryEvent
- func NewPbRepoMoveAccepted(ev *EvRepoMoveAccepted) pb.RegistryEvent
- func NewPbRepoMoved(ev *EvRepoMoved) pb.RegistryEvent
- func NewRegistryAdded(name string) pb.RegistryEvent
- func NewRepoAccepted(inf *pb.FsoRepoInfo) pb.RegistryEvent
- func NewRepoAclPolicyUpdated(policy pb.RepoAclPolicy_Policy) pb.RegistryEvent
- func NewRepoAdded(repoId []byte, globalPath string, repoEventId ulid.I) pb.RegistryEvent
- func NewRepoEnableGitlabAccepted(repoId uuid.I, gitlabNamespace string) pb.RegistryEvent
- func NewRepoInitPolicyUpdated(p *pb.FsoRepoInitPolicy) pb.RegistryEvent
- func NewRepoNamingConfigUpdated(patch *pb.FsoRepoNaming) pb.RegistryEvent
- func NewRepoNamingUpdated(n *pb.FsoRepoNaming) pb.RegistryEvent
- func NewRepoReinitAccepted(repoId []byte, globalPath, reason string) pb.RegistryEvent
- func NewRootAdded(inf *pb.FsoRootInfo) pb.RegistryEvent
- func NewRootArchiveRecipientsUpdated(root string, keys [][]byte) pb.RegistryEvent
- func NewRootRemoved(root string) pb.RegistryEvent
- func NewRootShadowBackupRecipientsUpdated(root string, keys [][]byte) pb.RegistryEvent
- func NewRootUpdated(inf *pb.FsoRootInfo) pb.RegistryEvent
- func NewShadowRepoMoveStarted(repoId uuid.I, repoEventId ulid.I, workflowId uuid.I) pb.RegistryEvent
- func NewSplitRootDisabled(root string) pb.RegistryEvent
- func NewSplitRootEnabled(root string) pb.RegistryEvent
- func NewSplitRootParamsUpdated(root string, cfg *pb.FsoSplitRootParams) pb.RegistryEvent
- func NewUnarchiveRepoCompletedError(repoId uuid.I, workflowId uuid.I, code int32) pb.RegistryEvent
- func NewUnarchiveRepoCompletedOk(repoId uuid.I, workflowId uuid.I) pb.RegistryEvent
- func NewUnarchiveRepoStarted(repoId uuid.I, workflowId uuid.I) pb.RegistryEvent
- func NewUnfreezeRepoCompleted2Error(repoId uuid.I, workflowId uuid.I, code int32) pb.RegistryEvent
- func NewUnfreezeRepoCompleted2Ok(repoId uuid.I, workflowId uuid.I) pb.RegistryEvent
- func NewUnfreezeRepoStarted2(repoId uuid.I, workflowId uuid.I) pb.RegistryEvent
- func ValidateRepoInitPolicy(policy *pb.FsoRepoInitPolicy) error
- func ValidateRepoNaming(naming *pb.FsoRepoNaming) error
- func ValidateRepoNamingPatch(naming *pb.FsoRepoNaming) error
- type ConfigMapFieldError
- type DepthPathInvalidError
- type EvArchiveRepoCompleted
- type EvArchiveRepoStarted
- type EvEphemeralWorkflowsEnabled
- type EvFreezeRepoCompleted2
- type EvFreezeRepoStarted2
- type EvPathFlagSet
- type EvPathFlagUnset
- type EvRegistryAdded
- type EvRepoAccepted
- type EvRepoAclPolicyUpdated
- type EvRepoAdded
- type EvRepoEnableGitlabAccepted
- type EvRepoInitPolicyUpdated
- type EvRepoMoveAccepted
- type EvRepoMoved
- type EvRepoNamingConfigUpdated
- type EvRepoNamingUpdated
- type EvRepoReinitAccepted
- type EvRootAdded
- type EvRootArchiveRecipientsUpdated
- type EvRootRemoved
- type EvRootShadowBackupRecipientsUpdated
- type EvRootUpdated
- type EvShadowRepoMoveStarted
- type EvSplitRootDisabled
- type EvSplitRootEnabled
- type EvSplitRootParamsUpdated
- type EvUnarchiveRepoCompleted
- type EvUnarchiveRepoStarted
- type EvUnfreezeRepoCompleted2
- type EvUnfreezeRepoStarted2
- type ParseError
- type PatternInvalidActionError
- type PatternInvalidError
- type PatternInvalidGlobError
- type RegistryEvent
Constants ¶
This section is empty.
Variables ¶
var ErrDuplicateGPGFingerprint = errors.New("duplicate GPG key fingerprints")
var ErrIgnoreHasWrongType = errors.New("`ignore` value has wrong type")
var ErrIgnoreListEmpty = errors.New("`ignore` list is empty")
var ErrInvalidEvent = errors.New("invalid event")
var ErrLevelNotInteger = errors.New("`level` is not an integer")
var ErrLevelOutOfRange = errors.New("`level` out of range")
var ErrLevelWrongType = errors.New("`level` has wrong type")
var ErrMalformedGPGFingerprint = errors.New("malformed GPG key fingerprint")
var ErrMalformedRepoNamingEmptyGlobalRoot = errors.New("malformed repo naming: empty global root")
var ErrMalformedRepoNamingNil = errors.New("nil repo naming not allowed")
var ErrMalformedRepoNamingRule = errors.New("unknown repo naming rule")
var ErrMalformedRootInfo = errors.New("malformed root info")
var ErrMissingGloblist = errors.New("missing globlist")
var ErrMissingLevel = errors.New("missing `level`")
var ErrMissingPatterns = errors.New("missing `patterns`")
var ErrMissingRootInfo = errors.New("missing root info")
var ErrNamingConfigNil = errors.New("naming config is nil")
var ErrPatternsWrongType = errors.New("`patterns` has wrong type")
var ErrPolicyNil = errors.New("invalid nil policy")
var ErrUnexpectedConfigField = errors.New("unexpected config fields")
var ErrUnknownEventType = errors.New("unknown event type")
var ErrUnknownRepoNamingPolicy = errors.New("unknown repo naming policy")
Functions ¶
func NewArchiveRepoStarted ¶
func NewEphemeralWorkflowsEnabled ¶
func NewEphemeralWorkflowsEnabled( ephemeralWorkflowsId uuid.I, ) pb.RegistryEvent
func NewFreezeRepoStarted2 ¶
func NewPathFlagSet ¶
func NewPathFlagSet( path string, flags uint32, ) pb.RegistryEvent
func NewPathFlagUnset ¶
func NewPathFlagUnset( path string, flags uint32, ) pb.RegistryEvent
func NewPbRepoMoveAccepted ¶
func NewPbRepoMoveAccepted(ev *EvRepoMoveAccepted) pb.RegistryEvent
func NewPbRepoMoved ¶
func NewPbRepoMoved(ev *EvRepoMoved) pb.RegistryEvent
func NewRegistryAdded ¶
func NewRegistryAdded(name string) pb.RegistryEvent
func NewRepoAccepted ¶
func NewRepoAccepted(inf *pb.FsoRepoInfo) pb.RegistryEvent
func NewRepoAclPolicyUpdated ¶
func NewRepoAclPolicyUpdated( policy pb.RepoAclPolicy_Policy, ) pb.RegistryEvent
func NewRepoAdded ¶
func NewRepoEnableGitlabAccepted ¶
func NewRepoEnableGitlabAccepted( repoId uuid.I, gitlabNamespace string, ) pb.RegistryEvent
func NewRepoInitPolicyUpdated ¶
func NewRepoInitPolicyUpdated(p *pb.FsoRepoInitPolicy) pb.RegistryEvent
func NewRepoNamingConfigUpdated ¶
func NewRepoNamingConfigUpdated(patch *pb.FsoRepoNaming) pb.RegistryEvent
func NewRepoNamingUpdated ¶
func NewRepoNamingUpdated(n *pb.FsoRepoNaming) pb.RegistryEvent
func NewRepoReinitAccepted ¶
func NewRepoReinitAccepted( repoId []byte, globalPath, reason string, ) pb.RegistryEvent
func NewRootAdded ¶
func NewRootAdded(inf *pb.FsoRootInfo) pb.RegistryEvent
func NewRootArchiveRecipientsUpdated ¶
func NewRootArchiveRecipientsUpdated( root string, keys [][]byte, ) pb.RegistryEvent
func NewRootRemoved ¶
func NewRootRemoved(root string) pb.RegistryEvent
func NewRootShadowBackupRecipientsUpdated ¶
func NewRootShadowBackupRecipientsUpdated( root string, keys [][]byte, ) pb.RegistryEvent
func NewRootUpdated ¶
func NewRootUpdated(inf *pb.FsoRootInfo) pb.RegistryEvent
func NewSplitRootDisabled ¶
func NewSplitRootDisabled( root string, ) pb.RegistryEvent
func NewSplitRootEnabled ¶
func NewSplitRootEnabled( root string, ) pb.RegistryEvent
func NewSplitRootParamsUpdated ¶
func NewSplitRootParamsUpdated( root string, cfg *pb.FsoSplitRootParams, ) pb.RegistryEvent
func NewUnarchiveRepoStarted ¶
func NewUnfreezeRepoStarted2 ¶
func ValidateRepoInitPolicy ¶
func ValidateRepoInitPolicy(policy *pb.FsoRepoInitPolicy) error
func ValidateRepoNaming ¶
func ValidateRepoNaming(naming *pb.FsoRepoNaming) error
func ValidateRepoNamingPatch ¶
func ValidateRepoNamingPatch(naming *pb.FsoRepoNaming) error
Types ¶
type ConfigMapFieldError ¶
func (*ConfigMapFieldError) Error ¶
func (err *ConfigMapFieldError) Error() string
type DepthPathInvalidError ¶
func (*DepthPathInvalidError) Error ¶
func (err *DepthPathInvalidError) Error() string
type EvArchiveRepoCompleted ¶
`RegistryEvent_EV_FSO_ARCHIVE_REPO_COMPLETED` aka `EvArchiveRepoCompleted`. See freeze-repo workflow aka freezerepowf.
func (EvArchiveRepoCompleted) RegistryEvent ¶
func (EvArchiveRepoCompleted) RegistryEvent()
type EvArchiveRepoStarted ¶
`RegistryEvent_EV_FSO_ARCHIVE_REPO_STARTED` aka `EvArchiveRepoStarted`. See freeze-repo workflow aka freezerepowf.
func (EvArchiveRepoStarted) RegistryEvent ¶
func (EvArchiveRepoStarted) RegistryEvent()
type EvEphemeralWorkflowsEnabled ¶
`RegistryEvent_EV_EPHEMERAL_WORKFLOWS_ENABLED` aka EvEphemeralWorkflowsEnabled`.
func (EvEphemeralWorkflowsEnabled) RegistryEvent ¶
func (EvEphemeralWorkflowsEnabled) RegistryEvent()
type EvFreezeRepoCompleted2 ¶
`RegistryEvent_EV_FSO_FREEZE_REPO_COMPLETED_2` aka `EvFreezeRepoCompleted2`. See freeze-repo workflow aka freezerepowf.
func (EvFreezeRepoCompleted2) RegistryEvent ¶
func (EvFreezeRepoCompleted2) RegistryEvent()
type EvFreezeRepoStarted2 ¶
`RegistryEvent_EV_FSO_FREEZE_REPO_STARTED_2` aka `EvFreezeRepoStarted2`. See freeze-repo workflow aka freezerepowf.
func (EvFreezeRepoStarted2) RegistryEvent ¶
func (EvFreezeRepoStarted2) RegistryEvent()
type EvPathFlagSet ¶
`RegistryEvent_EV_FSO_PATH_FLAG_SET` aka `EvPathFlagSet`.
func (EvPathFlagSet) RegistryEvent ¶
func (EvPathFlagSet) RegistryEvent()
type EvPathFlagUnset ¶
`RegistryEvent_EV_FSO_PATH_FLAG_UNSET` aka `EvPathFlagUnset`.
func (EvPathFlagUnset) RegistryEvent ¶
func (EvPathFlagUnset) RegistryEvent()
type EvRegistryAdded ¶
type EvRegistryAdded struct {
pb.FsoRegistryInfo
}
`RegistryEvent_EV_FSO_REGISTRY_ADDED` aka `EvRegistryAdded`.
func (EvRegistryAdded) RegistryEvent ¶
func (EvRegistryAdded) RegistryEvent()
type EvRepoAccepted ¶
type EvRepoAccepted struct {
pb.FsoRepoInfo
}
`RegistryEvent_EV_FSO_REPO_ACCEPTED` aka `EvRepoAccepted`.
func (EvRepoAccepted) RegistryEvent ¶
func (EvRepoAccepted) RegistryEvent()
type EvRepoAclPolicyUpdated ¶
type EvRepoAclPolicyUpdated struct {
Policy pb.RepoAclPolicy_Policy
}
`EV_FSO_REPO_ACL_POLICY_UPDATED` aka `EvRepoPolicyUpdated` sets the policy that is used to control ACLs on repo real files.
func (EvRepoAclPolicyUpdated) RegistryEvent ¶
func (EvRepoAclPolicyUpdated) RegistryEvent()
type EvRepoAdded ¶
type EvRepoAdded struct {
pb.FsoRepoInfo
}
`RegistryEvent_EV_FSO_REPO_ADDED` aka `EvRepoAdded`.
func (EvRepoAdded) RegistryEvent ¶
func (EvRepoAdded) RegistryEvent()
type EvRepoEnableGitlabAccepted ¶
`RegistryEvent_EV_FSO_REPO_ENABLE_GITLAB_ACCEPTED` aka `EvRepoEnableGitlabAccepted`.
func (EvRepoEnableGitlabAccepted) RegistryEvent ¶
func (EvRepoEnableGitlabAccepted) RegistryEvent()
type EvRepoInitPolicyUpdated ¶
type EvRepoInitPolicyUpdated struct {
pb.FsoRepoInitPolicy
}
`EV_FSO_REPO_INIT_POLICY_UPDATED` aka `EvRepoInitPolicyUpdated` sets the policy that is used to determine repo initialization options.
Fields:
- `fso_repo_init_policy.global_root`, `GlobalRoot`: The global path of the root.
- `fso_repo_init_policy.policy`, `Policy`: The policy type.
If policy type `IPOL_SUBDIR_TRACKING_GLOBLIST`:
- `fso_repo_init_policy.subdir_tracking_globlist`, `SubdirTrackingGloblist`: lists pairs of glob patterns and `SubdirTracking`. The first matching glob decides the `SubdirTracking`.
See `ValidateRepoInitPolicy()` for details.
func (EvRepoInitPolicyUpdated) RegistryEvent ¶
func (EvRepoInitPolicyUpdated) RegistryEvent()
type EvRepoMoveAccepted ¶
`RegistryEvent_EV_FSO_REPO_MOVE_ACCEPTED` aka `EvRepoMoveAccepted` starts a move-repo workflow, which changes the real repo and the shadow repo location. See package `moverepowf` for details.
func (EvRepoMoveAccepted) RegistryEvent ¶
func (EvRepoMoveAccepted) RegistryEvent()
type EvRepoMoved ¶
`RegistryEvent_EV_FSO_REPO_MOVED` aka `EvRepoMoved` is part of the move-repo workflow. See package `moverepowf` for details.
func (EvRepoMoved) RegistryEvent ¶
func (EvRepoMoved) RegistryEvent()
type EvRepoNamingConfigUpdated ¶
`EV_FSO_REPO_NAMING_CONFIG_UPDATED` aka `EvRepoNamingConfigUpdated` patches a naming configuration that has been previously set with `EV_FSO_REPO_NAMING_UPDATED`.
The meaning of 'patch' depends on the current naming rule. Naming rules should avoid `O(n^2)` event storage. Example: An ingnore list would be incrementally built by repeatedly adding paths. Each path is stored only once. If the entire list was instead stored each time, the total amount of events would require `O(n^2)` storage.
Fields:
- `fso_repo_naming.global_root`, `GlobalRoot`: The global path of the root for which the naming config is updated.
- `fso_repo_naming.rule`, `Rule`: The rule name. It must equal the rule that has been previously set with `EV_FSO_REPO_NAMING_UPDATED`.
- `fso_repo_naming.config`, `ConfigPatch`: The config patch.
See `ValidateRepoNamingPatch()` for valid rule-config combinations.
func (EvRepoNamingConfigUpdated) RegistryEvent ¶
func (EvRepoNamingConfigUpdated) RegistryEvent()
type EvRepoNamingUpdated ¶
type EvRepoNamingUpdated struct {
pb.FsoRepoNaming
}
`EV_FSO_REPO_NAMING_UPDATED` aka `EvRepoNamingUpdated` sets the naming convention that is used to discover untracked repos below a root.
Fields:
- `fso_repo_naming.global_root`, `GlobalRoot`: The global path of the root.
- `fso_repo_naming.rule`, `Rule`: The rule name.
- `fso_repo_naming.config`, `Config`: A config map that controls rule details. The structure of the config depends on the rule.
See `ValidateRepoNaming()` for available rules and config map structures.
The config can be patched with `EV_FSO_REPO_NAMING_CONFIG_UPDATED`.
func (EvRepoNamingUpdated) RegistryEvent ¶
func (EvRepoNamingUpdated) RegistryEvent()
type EvRepoReinitAccepted ¶
`RegistryEvent_EV_FSO_REPO_REINIT_ACCEPTED` aka `EvRepoReinitAccepted`.
func (EvRepoReinitAccepted) RegistryEvent ¶
func (EvRepoReinitAccepted) RegistryEvent()
type EvRootAdded ¶
type EvRootAdded struct {
pb.FsoRootInfo
}
`RegistryEvent_EV_FSO_ROOT_ADDED` aka `EvRootAdded`.
func (EvRootAdded) RegistryEvent ¶
func (EvRootAdded) RegistryEvent()
type EvRootArchiveRecipientsUpdated ¶
`EV_FSO_ROOT_ARCHIVE_RECIPIENTS_UPDATED` aka `EvRootArchiveRecipientsUpdated`.
func (EvRootArchiveRecipientsUpdated) RegistryEvent ¶
func (EvRootArchiveRecipientsUpdated) RegistryEvent()
type EvRootRemoved ¶
type EvRootRemoved struct {
GlobalRoot string
}
`RegistryEvent_EV_FSO_ROOT_REMOVED` aka `EvRootRemoved`.
func (EvRootRemoved) RegistryEvent ¶
func (EvRootRemoved) RegistryEvent()
type EvRootShadowBackupRecipientsUpdated ¶
`EV_FSO_ROOT_SHADOW_BACKUP_RECIPIENTS_UPDATED` aka `EvRootShadowBackupRecipientsUpdated`.
func (EvRootShadowBackupRecipientsUpdated) RegistryEvent ¶
func (EvRootShadowBackupRecipientsUpdated) RegistryEvent()
type EvRootUpdated ¶
type EvRootUpdated struct {
pb.FsoRootInfo
}
`RegistryEvent_EV_FSO_ROOT_UPDATED` aka `EvRootUpdated`.
func (EvRootUpdated) RegistryEvent ¶
func (EvRootUpdated) RegistryEvent()
type EvShadowRepoMoveStarted ¶
`EV_FSO_SHADOW_REPO_MOVE_STARTED` aka `EvShadowRepoMoveStarted` refers to a corresponding repo event.
func (EvShadowRepoMoveStarted) RegistryEvent ¶
func (EvShadowRepoMoveStarted) RegistryEvent()
type EvSplitRootDisabled ¶
type EvSplitRootDisabled struct {
GlobalRoot string
}
`RegistryEvent_EV_FSO_SPLIT_ROOT_DISABLED` aka `EvSplitRootDisabled`.
func (EvSplitRootDisabled) RegistryEvent ¶
func (EvSplitRootDisabled) RegistryEvent()
type EvSplitRootEnabled ¶
type EvSplitRootEnabled struct {
GlobalRoot string
}
`RegistryEvent_EV_FSO_SPLIT_ROOT_ENABLED` aka `EvSplitRootEnabled`.
func (EvSplitRootEnabled) RegistryEvent ¶
func (EvSplitRootEnabled) RegistryEvent()
type EvSplitRootParamsUpdated ¶
type EvSplitRootParamsUpdated struct { GlobalRoot string MaxDepth int32 MinDiskUsage int64 MaxDiskUsage int64 }
`RegistryEvent_EV_FSO_SPLIT_ROOT_PARAMS_UPDATED` aka `EvSplitRootParamsUpdated`.
func (EvSplitRootParamsUpdated) RegistryEvent ¶
func (EvSplitRootParamsUpdated) RegistryEvent()
type EvUnarchiveRepoCompleted ¶
`RegistryEvent_EV_FSO_UNARCHIVE_REPO_COMPLETED` aka `EvUnarchiveRepoCompleted`. See freeze-repo workflow aka freezerepowf.
func (EvUnarchiveRepoCompleted) RegistryEvent ¶
func (EvUnarchiveRepoCompleted) RegistryEvent()
type EvUnarchiveRepoStarted ¶
`RegistryEvent_EV_FSO_UNARCHIVE_REPO_STARTED` aka `EvUnarchiveRepoStarted`. See freeze-repo workflow aka freezerepowf.
func (EvUnarchiveRepoStarted) RegistryEvent ¶
func (EvUnarchiveRepoStarted) RegistryEvent()
type EvUnfreezeRepoCompleted2 ¶
`RegistryEvent_EV_FSO_UNFREEZE_REPO_COMPLETED_2` aka `EvUnfreezeRepoCompleted2`. See freeze-repo workflow aka freezerepowf.
func (EvUnfreezeRepoCompleted2) RegistryEvent ¶
func (EvUnfreezeRepoCompleted2) RegistryEvent()
type EvUnfreezeRepoStarted2 ¶
`RegistryEvent_EV_FSO_UNFREEZE_REPO_STARTED_2` aka `EvUnfreezeRepoStarted2`. See freeze-repo workflow aka freezerepowf.
func (EvUnfreezeRepoStarted2) RegistryEvent ¶
func (EvUnfreezeRepoStarted2) RegistryEvent()
type ParseError ¶
func (*ParseError) Error ¶
func (err *ParseError) Error() string
type PatternInvalidActionError ¶
type PatternInvalidActionError struct {
Pattern string
}
func (*PatternInvalidActionError) Error ¶
func (err *PatternInvalidActionError) Error() string
type PatternInvalidError ¶
type PatternInvalidError struct {
Pattern string
}
func (*PatternInvalidError) Error ¶
func (err *PatternInvalidError) Error() string
type PatternInvalidGlobError ¶
type PatternInvalidGlobError struct {
Pattern string
}
func (*PatternInvalidGlobError) Error ¶
func (err *PatternInvalidGlobError) Error() string
type RegistryEvent ¶
type RegistryEvent interface {
RegistryEvent()
}
func FromPbMust ¶
func FromPbMust(evpb pb.RegistryEvent) RegistryEvent
func FromPbValidate ¶
func FromPbValidate(evpb pb.RegistryEvent) (ev RegistryEvent, err error)