pbevents

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMalformedGPGFingerprint = errors.New("malformed GPG key fingerprint")
View Source
var ErrMalformedGitAuthorEmail = errors.New("malformed GitAuthor.Email")
View Source
var ErrMalformedGitAuthorName = errors.New("malformed GitAuthor.Name")
View Source
var ErrMissingGitAuthor = errors.New("missing GitAuthor")
View Source
var ErrUnknownEventType = errors.New("unknown event type")

Functions

func NewArchiveRecipientsUpdated

func NewArchiveRecipientsUpdated(keys [][]byte) pb.RepoEvent

func NewArchiveRepoCompletedError

func NewArchiveRepoCompletedError(
	workflowId uuid.I, code int32,
) pb.RepoEvent

func NewArchiveRepoCompletedOk

func NewArchiveRepoCompletedOk(
	workflowId uuid.I,
	tarPath string,
) pb.RepoEvent

func NewArchiveRepoStarted

func NewArchiveRepoStarted(
	workflowId uuid.I,
) pb.RepoEvent

func NewEnableGitlabAccepted

func NewEnableGitlabAccepted(host, path string) pb.RepoEvent

func NewFreezeRepoCompleted2Error

func NewFreezeRepoCompleted2Error(
	workflowId uuid.I, code int32,
) pb.RepoEvent

func NewFreezeRepoCompleted2Ok

func NewFreezeRepoCompleted2Ok(
	workflowId uuid.I,
) pb.RepoEvent

func NewFreezeRepoStarted2

func NewFreezeRepoStarted2(
	workflowId uuid.I,
) pb.RepoEvent

func NewGitRepoCreated

func NewGitRepoCreated(inf *pb.FsoGitRepoInfo) pb.RepoEvent

func NewPbRepoMoveStarted

func NewPbRepoMoveStarted(ev *EvRepoMoveStarted) pb.RepoEvent

func NewPbRepoMoved

func NewPbRepoMoved(ev *EvRepoMoved) pb.RepoEvent

func NewRepoErrorCleared

func NewRepoErrorCleared() pb.RepoEvent

func NewRepoErrorSet

func NewRepoErrorSet(msg string) pb.RepoEvent

func NewRepoInitStarted

func NewRepoInitStarted(inf *pb.FsoRepoInitInfo) pb.RepoEvent

func NewShadowBackupRecipientsUpdated

func NewShadowBackupRecipientsUpdated(keys [][]byte) pb.RepoEvent

func NewShadowBackupRepoCreated

func NewShadowBackupRepoCreated(shadowBackupURL string) pb.RepoEvent

func NewShadowBackupRepoMoved

func NewShadowBackupRepoMoved(shadowBackupURL string) pb.RepoEvent

func NewShadowRepoCreated

func NewShadowRepoCreated(shadowPath string) pb.RepoEvent

func NewShadowRepoMoveStarted

func NewShadowRepoMoveStarted(
	workflowId uuid.I, newShadowPath string,
) pb.RepoEvent

func NewShadowRepoMoved

func NewShadowRepoMoved(
	workflowId uuid.I, workflowEventId ulid.I, newShadowPath string,
) pb.RepoEvent

func NewTarttRepoCreated

func NewTarttRepoCreated(tarttURL string) pb.RepoEvent

func NewUnarchiveRepoCompletedError

func NewUnarchiveRepoCompletedError(
	workflowId uuid.I, code int32,
) pb.RepoEvent

func NewUnarchiveRepoCompletedOk

func NewUnarchiveRepoCompletedOk(
	workflowId uuid.I,
) pb.RepoEvent

func NewUnarchiveRepoStarted

func NewUnarchiveRepoStarted(
	workflowId uuid.I,
) pb.RepoEvent

func NewUnfreezeRepoCompleted2Error

func NewUnfreezeRepoCompleted2Error(
	workflowId uuid.I, code int32,
) pb.RepoEvent

func NewUnfreezeRepoCompleted2Ok

func NewUnfreezeRepoCompleted2Ok(
	workflowId uuid.I,
) pb.RepoEvent

func NewUnfreezeRepoStarted2

func NewUnfreezeRepoStarted2(
	workflowId uuid.I,
) pb.RepoEvent

Types

type EvArchiveRecipientsUpdated

type EvArchiveRecipientsUpdated struct {
	Keys [][]byte
}

`RepoEvent_EV_FSO_ARCHIVE_RECIPIENTS_UPDATED` aka `EvArchiveRecipientsUpdated` replaces the GPG key fingerprints to which tartt archive secrets are encrypted.

func (EvArchiveRecipientsUpdated) RepoEvent

func (EvArchiveRecipientsUpdated) RepoEvent()

type EvArchiveRepoCompleted

type EvArchiveRepoCompleted struct {
	WorkflowId uuid.I
	StatusCode int32
	TarPath    string
}

`RepoEvent_EV_FSO_ARCHIVE_REPO_COMPLETED` aka `EvArchiveRepoCompleted`. See freeze-repo workflow aka freezerepowf.

func (EvArchiveRepoCompleted) RepoEvent

func (EvArchiveRepoCompleted) RepoEvent()

type EvArchiveRepoStarted

type EvArchiveRepoStarted struct {
	WorkflowId uuid.I
}

`RepoEvent_EV_FSO_ARCHIVE_REPO_STARTED` aka `EvArchiveRepoStarted`. See freeze-repo workflow aka freezerepowf.

func (EvArchiveRepoStarted) RepoEvent

func (EvArchiveRepoStarted) RepoEvent()

type EvEnableGitlabAccepted

type EvEnableGitlabAccepted struct {
	GitlabHost string
	GitlabPath string
}

`RepoEvent_EV_FSO_ENABLE_GITLAB_ACCEPTED` aka `EvEnableGitlabAccepted`.

func (EvEnableGitlabAccepted) RepoEvent

func (EvEnableGitlabAccepted) RepoEvent()

type EvFreezeRepoCompleted

type EvFreezeRepoCompleted struct{}

`RepoEvent_EV_FSO_FREEZE_REPO_COMPLETED` aka `EvFreezeRepoCompleted` is a legacy event that was used in the preliminary repo-freeze implementation.

func (EvFreezeRepoCompleted) RepoEvent

func (EvFreezeRepoCompleted) RepoEvent()

type EvFreezeRepoCompleted2

type EvFreezeRepoCompleted2 struct {
	WorkflowId uuid.I
	StatusCode int32
}

`RepoEvent_EV_FSO_FREEZE_REPO_COMPLETED_2` aka `EvFreezeRepoCompleted2`. See freeze-repo workflow aka freezerepowf.

func (EvFreezeRepoCompleted2) RepoEvent

func (EvFreezeRepoCompleted2) RepoEvent()

type EvFreezeRepoStarted

type EvFreezeRepoStarted struct{}

`RepoEvent_EV_FSO_FREEZE_REPO_STARTED` aka `EvFreezeRepoStarted` is a legacy event that was used in the preliminary repo-freeze implementation.

func (EvFreezeRepoStarted) RepoEvent

func (EvFreezeRepoStarted) RepoEvent()

type EvFreezeRepoStarted2

type EvFreezeRepoStarted2 struct {
	WorkflowId uuid.I
}

`RepoEvent_EV_FSO_FREEZE_REPO_STARTED_2` aka `EvFreezeRepoStarted2`. See freeze-repo workflow aka freezerepowf.

func (EvFreezeRepoStarted2) RepoEvent

func (EvFreezeRepoStarted2) RepoEvent()

type EvGitRepoCreated

type EvGitRepoCreated struct {
	pb.FsoGitRepoInfo
}

`RepoEvent_EV_FSO_GIT_REPO_CREATED` aka `EvGitRepoCreated` is posted if a Git repo at a Git hosting service is created.

func (EvGitRepoCreated) RepoEvent

func (EvGitRepoCreated) RepoEvent()

type EvRepoErrorCleared

type EvRepoErrorCleared struct{}

`RepoEvent_EV_FSO_REPO_ERROR_CLEARED` aka `EvRepoErrorCleared` clears an repo error.

func (EvRepoErrorCleared) RepoEvent

func (EvRepoErrorCleared) RepoEvent()

type EvRepoErrorSet

type EvRepoErrorSet struct {
	Message string
}

`RepoEvent_EV_FSO_REPO_ERROR_SET` aka `EvRepoErrorSet` sets an error string on the repo.

func (EvRepoErrorSet) RepoEvent

func (EvRepoErrorSet) RepoEvent()

type EvRepoInitStarted

type EvRepoInitStarted struct {
	pb.FsoRepoInitInfo
}

`RepoEvent_EV_FSO_REPO_INIT_STARTED` aka `EvRepoInitStarted` is the event of a repo aggregate.

func (EvRepoInitStarted) RepoEvent

func (EvRepoInitStarted) RepoEvent()

type EvRepoMoveStarted

type EvRepoMoveStarted struct {
	RegistryEventId ulid.I
	WorkflowId      uuid.I
	OldGlobalPath   string
	OldFileHost     string
	OldHostPath     string
	OldShadowPath   string
	NewGlobalPath   string
	NewFileHost     string
	NewHostPath     string
}

`RepoEvent_EV_FSO_REPO_MOVE_STARTED` aka `EvRepoMoveStarted` is part of the move-repo workflow. See package `moverepowf` for details.

func (EvRepoMoveStarted) RepoEvent

func (EvRepoMoveStarted) RepoEvent()

type EvRepoMoved

type EvRepoMoved struct {
	WorkflowId      uuid.I
	WorkflowEventId ulid.I
	GlobalPath      string
	FileHost        string
	HostPath        string
	ShadowPath      string
}

`RepoEvent_EV_FSO_REPO_MOVED` aka `EvRepoMoved` is part of the move-repo workflow. See package `moverepowf` for details.

func (EvRepoMoved) RepoEvent

func (EvRepoMoved) RepoEvent()

type EvShadowBackupRecipientsUpdated

type EvShadowBackupRecipientsUpdated struct {
	Keys [][]byte
}

`RepoEvent_EV_FSO_SHADOW_BACKUP_RECIPIENTS_UPDATED` aka `EvShadowBackupRecipientsUpdated` replaces the GPG key fingerprints to which archive backups are encrypted.

func (EvShadowBackupRecipientsUpdated) RepoEvent

func (EvShadowBackupRecipientsUpdated) RepoEvent()

type EvShadowBackupRepoCreated

type EvShadowBackupRepoCreated struct {
	pb.FsoShadowBackupRepoInfo
}

`RepoEvent_EV_FSO_SHADOW_BACKUP_REPO_CREATED` aka `EvShadowBackupRepoCreated` confirms that a backup directory has been created. It contains the location as a `nogfsobak://` URL.

See `EvTarttRepoCreated` for discussion about potential future two-phase initialization.

func (EvShadowBackupRepoCreated) RepoEvent

func (EvShadowBackupRepoCreated) RepoEvent()

type EvShadowBackupRepoMoved

type EvShadowBackupRepoMoved struct {
	pb.FsoShadowBackupRepoInfo
}

`RepoEvent_EV_FSO_SHADOW_BACKUP_REPO_MOVED` aka `EvShadowBackupRepoMoved` changes the location of the backup directory. It contains the location as a `nogfsobak://` URL.

func (EvShadowBackupRepoMoved) RepoEvent

func (EvShadowBackupRepoMoved) RepoEvent()

type EvShadowRepoCreated

type EvShadowRepoCreated struct {
	pb.FsoShadowRepoInfo
}

`RepoEvent_EV_FSO_SHADOW_REPO_CREATED` aka `EvShadowRepoCreated` is posted after the shadow has been created. It contains details about the repo location.

func (EvShadowRepoCreated) RepoEvent

func (EvShadowRepoCreated) RepoEvent()

type EvShadowRepoMoveStarted

type EvShadowRepoMoveStarted struct {
	WorkflowId    uuid.I
	NewShadowPath string
}

`RepoEvent_EV_FSO_SHADOW_REPO_MOVE_STARTED` aka `EvShadowRepoMoveStarted` starts a workflow that changes the shadow location.

The workflow ends with:

  • If committed, `RepoEvent_EV_FSO_SHADOW_REPO_MOVED` aka `EvShadowRepoMoved`.
  • There is currently no way to abort the workflow.

func (EvShadowRepoMoveStarted) RepoEvent

func (EvShadowRepoMoveStarted) RepoEvent()

type EvShadowRepoMoved

type EvShadowRepoMoved struct {
	WorkflowId uuid.I

	// `WorkflowEventId` may be `ulid.Nil` for legacy events that were not
	// replicated from a workflow event.
	WorkflowEventId ulid.I

	NewShadowPath string
}

`RepoEvent_EV_FSO_SHADOW_REPO_MOVED` aka `EvShadowRepoMoved` completes a workflow that started with `RepoEvent_EV_FSO_SHADOW_REPO_MOVE_STARTED` aka `EvShadowRepoMoveStarted`.

func (EvShadowRepoMoved) RepoEvent

func (EvShadowRepoMoved) RepoEvent()

type EvTarttRepoCreated

type EvTarttRepoCreated struct {
	pb.FsoArchiveRepoInfo
}

`RepoEvent_EV_FSO_TARTT_REPO_CREATED` aka `EvTarttRepoCreated` confirms that a tartt repo has been created. It contains the tartt location as a `tartt://` URL.

`RepoEvent_EV_FSO_TARTT_REPO_CREATED` is currently the only event related to tartt repo initialization. Its name is chosen such that a corresponding event could be added in the future that would indicate the start of the tartt repo creation process:

  • future registry event `tartt repo init started`, which would reserve the URL;
  • repos event `RepoEvent_EV_FSO_TARTT_REPO_CREATED` would then indicate completion of the inititialization process.

Their relation would be similar to:

  • registry event `RepoEvent_EV_FSO_REPO_ENABLE_GITLAB_ACCEPTED`;
  • repos event `RepoEvent_EV_FSO_GIT_REPO_CREATED`.

func (EvTarttRepoCreated) RepoEvent

func (EvTarttRepoCreated) RepoEvent()

type EvUnarchiveRepoCompleted

type EvUnarchiveRepoCompleted struct {
	WorkflowId uuid.I
	StatusCode int32
}

`RepoEvent_EV_FSO_UNARCHIVE_REPO_COMPLETED` aka `EvUnarchiveRepoCompleted`. See freeze-repo workflow aka freezerepowf.

func (EvUnarchiveRepoCompleted) RepoEvent

func (EvUnarchiveRepoCompleted) RepoEvent()

type EvUnarchiveRepoStarted

type EvUnarchiveRepoStarted struct {
	WorkflowId uuid.I
}

`RepoEvent_EV_FSO_UNARCHIVE_REPO_STARTED` aka `EvUnarchiveRepoStarted`. See freeze-repo workflow aka freezerepowf.

func (EvUnarchiveRepoStarted) RepoEvent

func (EvUnarchiveRepoStarted) RepoEvent()

type EvUnfreezeRepoCompleted

type EvUnfreezeRepoCompleted struct{}

`RepoEvent_EV_FSO_UNFREEZE_REPO_COMPLETED` aka `EvUnfreezeRepoCompleted` is a legacy event that was used in the preliminary repo-freeze implementation.

func (EvUnfreezeRepoCompleted) RepoEvent

func (EvUnfreezeRepoCompleted) RepoEvent()

type EvUnfreezeRepoCompleted2

type EvUnfreezeRepoCompleted2 struct {
	WorkflowId uuid.I
	StatusCode int32
}

`RepoEvent_EV_FSO_UNFREEZE_REPO_COMPLETED_2` aka `EvUnfreezeRepoCompleted2`. See freeze-repo workflow aka freezerepowf.

func (EvUnfreezeRepoCompleted2) RepoEvent

func (EvUnfreezeRepoCompleted2) RepoEvent()

type EvUnfreezeRepoStarted

type EvUnfreezeRepoStarted struct{}

`RepoEvent_EV_FSO_UNFREEZE_REPO_STARTED` aka `EvUnfreezeRepoStarted` is a legacy event that was used in the preliminary repo-freeze implementation.

func (EvUnfreezeRepoStarted) RepoEvent

func (EvUnfreezeRepoStarted) RepoEvent()

type EvUnfreezeRepoStarted2

type EvUnfreezeRepoStarted2 struct {
	WorkflowId uuid.I
}

`RepoEvent_EV_FSO_UNFREEZE_REPO_STARTED_2` aka `EvUnfreezeRepoStarted2`. See freeze-repo workflow aka freezerepowf.

func (EvUnfreezeRepoStarted2) RepoEvent

func (EvUnfreezeRepoStarted2) RepoEvent()

type ParseError

type ParseError struct {
	What string
	Err  error
}

func (*ParseError) Error

func (err *ParseError) Error() string

type RepoEvent

type RepoEvent interface {
	RepoEvent()
}

func FromPbMust

func FromPbMust(evpb pb.RepoEvent) RepoEvent

func FromPbValidate

func FromPbValidate(evpb pb.RepoEvent) (ev RepoEvent, err error)

Jump to

Keyboard shortcuts

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