events

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APITokenType              auditor.TargetType = "APIToken"
	APITokenCreatedActionType string             = "APITokenCreated"
	APITokenRevokedActionType string             = "APITokenRevoked"
)
View Source
const (
	GroupType                    auditor.TargetType = "Group"
	GroupCreatedActionType       string             = "GroupCreated"
	GroupUpdatedActionType       string             = "GroupUpdated"
	GroupDeletedActionType       string             = "GroupDeleted"
	GroupMemberAddedActionType   string             = "GroupMemberAdded"
	GroupMemberRemovedActionType string             = "GroupMemberRemoved"
)
View Source
const (
	ProjectType                    auditor.TargetType = "Project"
	ProjectMemberAddedActionType   string             = "ProjectMemberAdded"
	ProjectMemberRemovedActionType string             = "ProjectMemberRemoved"
)
View Source
const (
	UserType               auditor.TargetType = "User"
	UserSignedUpActionType string             = "SignedUp"
	UserLoggedInActionType string             = "LoggedIn"
)
View Source
const (
	WorkflowType              auditor.TargetType = "Workflow"
	WorkflowCreatedActionType string             = "WorkflowCreated"
	WorkflowUpdatedActionType string             = "WorkflowUpdated"
	WorkflowDeletedActionType string             = "WorkflowDeleted"
)
View Source
const (
	WorkflowContractType                       auditor.TargetType = "WorkflowContract"
	WorkflowContractCreatedActionType          string             = "WorkflowContractCreated"
	WorkflowContractUpdatedActionType          string             = "WorkflowContractUpdated"
	WorkflowContractDeletedActionType          string             = "WorkflowContractDeleted"
	WorkflowContractContractAttachedActionType string             = "WorkflowContractContractAttached"
	WorkflowContractContractDetachedActionType string             = "WorkflowContractContractDetached"
)
View Source
const (
	OrgType auditor.TargetType = "Organization"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APITokenBase added in v1.0.0

type APITokenBase struct {
	APITokenID   *uuid.UUID `json:"api_token_id,omitempty"`
	APITokenName string     `json:"api_token_name,omitempty"`
}

func (*APITokenBase) ActionInfo added in v1.0.0

func (a *APITokenBase) ActionInfo() (json.RawMessage, error)

func (*APITokenBase) RequiresActor added in v1.0.0

func (a *APITokenBase) RequiresActor() bool

func (*APITokenBase) TargetID added in v1.0.0

func (a *APITokenBase) TargetID() *uuid.UUID

func (*APITokenBase) TargetType added in v1.0.0

func (a *APITokenBase) TargetType() auditor.TargetType

type APITokenCreated added in v1.0.0

type APITokenCreated struct {
	*APITokenBase
	APITokenDescription *string    `json:"description,omitempty"`
	ExpiresAt           *time.Time `json:"expires_at,omitempty"`
}

func (*APITokenCreated) ActionInfo added in v1.0.0

func (a *APITokenCreated) ActionInfo() (json.RawMessage, error)

func (*APITokenCreated) ActionType added in v1.0.0

func (a *APITokenCreated) ActionType() string

func (*APITokenCreated) Description added in v1.0.0

func (a *APITokenCreated) Description() string

type APITokenRevoked added in v1.0.0

type APITokenRevoked struct {
	*APITokenBase
}

func (*APITokenRevoked) ActionInfo added in v1.0.0

func (a *APITokenRevoked) ActionInfo() (json.RawMessage, error)

func (*APITokenRevoked) ActionType added in v1.0.0

func (a *APITokenRevoked) ActionType() string

func (*APITokenRevoked) Description added in v1.0.0

func (a *APITokenRevoked) Description() string

type GroupBase added in v1.11.0

type GroupBase struct {
	GroupID   *uuid.UUID `json:"group_id,omitempty"`
	GroupName string     `json:"group_name,omitempty"`
}

GroupBase is the base struct for group events

func (*GroupBase) ActionInfo added in v1.11.0

func (g *GroupBase) ActionInfo() (json.RawMessage, error)

func (*GroupBase) RequiresActor added in v1.11.0

func (g *GroupBase) RequiresActor() bool

func (*GroupBase) TargetID added in v1.11.0

func (g *GroupBase) TargetID() *uuid.UUID

func (*GroupBase) TargetType added in v1.11.0

func (g *GroupBase) TargetType() auditor.TargetType

type GroupCreated added in v1.11.0

type GroupCreated struct {
	*GroupBase
	GroupDescription string `json:"group_description,omitempty"`
}

GroupCreated represents the creation of a group

func (*GroupCreated) ActionInfo added in v1.11.0

func (g *GroupCreated) ActionInfo() (json.RawMessage, error)

func (*GroupCreated) ActionType added in v1.11.0

func (g *GroupCreated) ActionType() string

func (*GroupCreated) Description added in v1.11.0

func (g *GroupCreated) Description() string

type GroupDeleted added in v1.11.0

type GroupDeleted struct {
	*GroupBase
}

GroupDeleted represents the deletion of a group

func (*GroupDeleted) ActionInfo added in v1.11.0

func (g *GroupDeleted) ActionInfo() (json.RawMessage, error)

func (*GroupDeleted) ActionType added in v1.11.0

func (g *GroupDeleted) ActionType() string

func (*GroupDeleted) Description added in v1.11.0

func (g *GroupDeleted) Description() string

type GroupMemberAdded added in v1.12.0

type GroupMemberAdded struct {
	*GroupBase
	UserID     *uuid.UUID `json:"user_id,omitempty"`
	UserEmail  string     `json:"user_email,omitempty"`
	Maintainer bool       `json:"maintainer,omitempty"`
}

GroupMemberAdded represents the addition of a member to a group

func (*GroupMemberAdded) ActionInfo added in v1.12.0

func (g *GroupMemberAdded) ActionInfo() (json.RawMessage, error)

func (*GroupMemberAdded) ActionType added in v1.12.0

func (g *GroupMemberAdded) ActionType() string

func (*GroupMemberAdded) Description added in v1.12.0

func (g *GroupMemberAdded) Description() string

type GroupMemberRemoved added in v1.12.0

type GroupMemberRemoved struct {
	*GroupBase
	UserID    *uuid.UUID `json:"user_id,omitempty"`
	UserEmail string     `json:"user_email,omitempty"`
}

GroupMemberRemoved represents the removal of a member from a group

func (*GroupMemberRemoved) ActionInfo added in v1.12.0

func (g *GroupMemberRemoved) ActionInfo() (json.RawMessage, error)

func (*GroupMemberRemoved) ActionType added in v1.12.0

func (g *GroupMemberRemoved) ActionType() string

func (*GroupMemberRemoved) Description added in v1.12.0

func (g *GroupMemberRemoved) Description() string

type GroupUpdated added in v1.11.0

type GroupUpdated struct {
	*GroupBase
	NewDescription *string `json:"new_description,omitempty"`
	OldName        *string `json:"old_name,omitempty"`
	NewName        *string `json:"new_name,omitempty"`
}

GroupUpdated represents an update to a group

func (*GroupUpdated) ActionInfo added in v1.11.0

func (g *GroupUpdated) ActionInfo() (json.RawMessage, error)

func (*GroupUpdated) ActionType added in v1.11.0

func (g *GroupUpdated) ActionType() string

func (*GroupUpdated) Description added in v1.11.0

func (g *GroupUpdated) Description() string

type OrgBase added in v0.137.0

type OrgBase struct {
	OrgID   *uuid.UUID `json:"org_id,omitempty"`
	OrgName string     `json:"org_name,omitempty"`
}

func (*OrgBase) ActionInfo added in v0.137.0

func (p *OrgBase) ActionInfo() (json.RawMessage, error)

func (*OrgBase) RequiresActor added in v0.137.0

func (p *OrgBase) RequiresActor() bool

func (*OrgBase) TargetID added in v0.137.0

func (p *OrgBase) TargetID() *uuid.UUID

func (*OrgBase) TargetType added in v0.137.0

func (p *OrgBase) TargetType() auditor.TargetType

type OrgCreated added in v0.137.0

type OrgCreated struct {
	*OrgBase
}

Org created

func (*OrgCreated) ActionType added in v0.137.0

func (p *OrgCreated) ActionType() string

func (*OrgCreated) Description added in v0.137.0

func (p *OrgCreated) Description() string

type OrgUserInvited added in v0.137.0

type OrgUserInvited struct {
	*OrgBase
	ReceiverEmail string
	Role          string
}

user got invited to the organization

func (*OrgUserInvited) ActionInfo added in v0.137.0

func (p *OrgUserInvited) ActionInfo() (json.RawMessage, error)

func (*OrgUserInvited) ActionType added in v0.137.0

func (p *OrgUserInvited) ActionType() string

func (*OrgUserInvited) Description added in v0.137.0

func (p *OrgUserInvited) Description() string

type OrgUserJoined added in v0.137.0

type OrgUserJoined struct {
	*OrgBase
}

user joined the organization

func (*OrgUserJoined) ActionType added in v0.137.0

func (p *OrgUserJoined) ActionType() string

func (*OrgUserJoined) Description added in v0.137.0

func (p *OrgUserJoined) Description() string

type OrgUserLeft added in v0.137.0

type OrgUserLeft struct {
	*OrgBase
}

user left the organization

func (*OrgUserLeft) ActionType added in v0.137.0

func (p *OrgUserLeft) ActionType() string

func (*OrgUserLeft) Description added in v0.137.0

func (p *OrgUserLeft) Description() string

type ProjectBase added in v1.13.0

type ProjectBase struct {
	ProjectID   *uuid.UUID `json:"project_id,omitempty"`
	ProjectName string     `json:"project_name,omitempty"`
}

ProjectBase is the base struct for project events

func (*ProjectBase) ActionInfo added in v1.13.0

func (p *ProjectBase) ActionInfo() (json.RawMessage, error)

func (*ProjectBase) RequiresActor added in v1.13.0

func (p *ProjectBase) RequiresActor() bool

func (*ProjectBase) TargetID added in v1.13.0

func (p *ProjectBase) TargetID() *uuid.UUID

func (*ProjectBase) TargetType added in v1.13.0

func (p *ProjectBase) TargetType() auditor.TargetType

type ProjectMemberAdded added in v1.13.0

type ProjectMemberAdded struct {
	*ProjectBase
	UserID    *uuid.UUID `json:"user_id,omitempty"`
	UserEmail string     `json:"user_email,omitempty"`
	Role      string     `json:"role,omitempty"`
}

ProjectMemberAdded represents the addition of a member to a project

func (*ProjectMemberAdded) ActionInfo added in v1.13.0

func (p *ProjectMemberAdded) ActionInfo() (json.RawMessage, error)

func (*ProjectMemberAdded) ActionType added in v1.13.0

func (p *ProjectMemberAdded) ActionType() string

func (*ProjectMemberAdded) Description added in v1.13.0

func (p *ProjectMemberAdded) Description() string

type ProjectMemberRemoved added in v1.13.0

type ProjectMemberRemoved struct {
	*ProjectBase
	UserID    *uuid.UUID `json:"user_id,omitempty"`
	UserEmail string     `json:"user_email,omitempty"`
}

ProjectMemberRemoved represents the removal of a member from a project

func (*ProjectMemberRemoved) ActionInfo added in v1.13.0

func (p *ProjectMemberRemoved) ActionInfo() (json.RawMessage, error)

func (*ProjectMemberRemoved) ActionType added in v1.13.0

func (p *ProjectMemberRemoved) ActionType() string

func (*ProjectMemberRemoved) Description added in v1.13.0

func (p *ProjectMemberRemoved) Description() string

type UserBase

type UserBase struct {
	UserID *uuid.UUID `json:"user_id,omitempty"`
	Email  string     `json:"email,omitempty"`
}

UserBase is the base struct for policy events

func (*UserBase) ActionInfo

func (p *UserBase) ActionInfo() (json.RawMessage, error)

func (*UserBase) RequiresActor added in v0.137.0

func (p *UserBase) RequiresActor() bool

func (*UserBase) TargetID

func (p *UserBase) TargetID() *uuid.UUID

func (*UserBase) TargetType

func (p *UserBase) TargetType() auditor.TargetType

type UserLoggedIn

type UserLoggedIn struct {
	*UserBase
	// This timestamp can be used to generate a new digest for the user and burst the cache
	LoggedIn time.Time
}

func (*UserLoggedIn) ActionInfo

func (p *UserLoggedIn) ActionInfo() (json.RawMessage, error)

func (*UserLoggedIn) ActionType

func (p *UserLoggedIn) ActionType() string

func (*UserLoggedIn) Description

func (p *UserLoggedIn) Description() string

type UserSignedUp

type UserSignedUp struct {
	*UserBase
}

func (*UserSignedUp) ActionType

func (p *UserSignedUp) ActionType() string

func (*UserSignedUp) Description

func (p *UserSignedUp) Description() string

type WorkflowBase added in v1.0.0

type WorkflowBase struct {
	WorkflowID   *uuid.UUID `json:"workflow_id,omitempty"`
	WorkflowName string     `json:"workflow_name,omitempty"`
	ProjectName  string     `json:"project_name,omitempty"`
}

WorkflowBase is the base struct for workflow events

func (*WorkflowBase) ActionInfo added in v1.0.0

func (w *WorkflowBase) ActionInfo() (json.RawMessage, error)

func (*WorkflowBase) RequiresActor added in v1.0.0

func (w *WorkflowBase) RequiresActor() bool

func (*WorkflowBase) TargetID added in v1.0.0

func (w *WorkflowBase) TargetID() *uuid.UUID

func (*WorkflowBase) TargetType added in v1.0.0

func (w *WorkflowBase) TargetType() auditor.TargetType

type WorkflowContractAttached added in v0.142.0

type WorkflowContractAttached struct {
	*WorkflowContractBase
	WorkflowID   *uuid.UUID `json:"workflow_id,omitempty"`
	WorkflowName string     `json:"workflow_name,omitempty"`
}

func (*WorkflowContractAttached) ActionInfo added in v0.142.0

func (w *WorkflowContractAttached) ActionInfo() (json.RawMessage, error)

func (*WorkflowContractAttached) ActionType added in v0.142.0

func (w *WorkflowContractAttached) ActionType() string

func (*WorkflowContractAttached) Description added in v0.142.0

func (w *WorkflowContractAttached) Description() string

type WorkflowContractBase added in v0.142.0

type WorkflowContractBase struct {
	WorkflowContractID   *uuid.UUID `json:"workflow_contract_id,omitempty"`
	WorkflowContractName string     `json:"workflow_contract_name,omitempty"`
}

WorkflowContractBase is the base struct for workflow contract events

func (*WorkflowContractBase) ActionInfo added in v0.142.0

func (w *WorkflowContractBase) ActionInfo() (json.RawMessage, error)

func (*WorkflowContractBase) RequiresActor added in v0.142.0

func (w *WorkflowContractBase) RequiresActor() bool

func (*WorkflowContractBase) TargetID added in v0.142.0

func (w *WorkflowContractBase) TargetID() *uuid.UUID

func (*WorkflowContractBase) TargetType added in v0.142.0

func (w *WorkflowContractBase) TargetType() auditor.TargetType

type WorkflowContractCreated added in v0.142.0

type WorkflowContractCreated struct {
	*WorkflowContractBase
}

func (*WorkflowContractCreated) ActionInfo added in v0.142.0

func (w *WorkflowContractCreated) ActionInfo() (json.RawMessage, error)

func (*WorkflowContractCreated) ActionType added in v0.142.0

func (w *WorkflowContractCreated) ActionType() string

func (*WorkflowContractCreated) Description added in v0.142.0

func (w *WorkflowContractCreated) Description() string

func (*WorkflowContractCreated) TargetID added in v0.142.0

func (w *WorkflowContractCreated) TargetID() *uuid.UUID

type WorkflowContractDeleted added in v0.142.0

type WorkflowContractDeleted struct {
	*WorkflowContractBase
}

func (*WorkflowContractDeleted) ActionInfo added in v0.142.0

func (w *WorkflowContractDeleted) ActionInfo() (json.RawMessage, error)

func (*WorkflowContractDeleted) ActionType added in v0.142.0

func (w *WorkflowContractDeleted) ActionType() string

func (*WorkflowContractDeleted) Description added in v0.142.0

func (w *WorkflowContractDeleted) Description() string

type WorkflowContractDetached added in v0.142.0

type WorkflowContractDetached struct {
	*WorkflowContractBase
	WorkflowID   *uuid.UUID `json:"workflow_id,omitempty"`
	WorkflowName string     `json:"workflow_name,omitempty"`
}

func (*WorkflowContractDetached) ActionInfo added in v0.142.0

func (w *WorkflowContractDetached) ActionInfo() (json.RawMessage, error)

func (*WorkflowContractDetached) ActionType added in v0.142.0

func (w *WorkflowContractDetached) ActionType() string

func (*WorkflowContractDetached) Description added in v0.142.0

func (w *WorkflowContractDetached) Description() string

type WorkflowContractUpdated added in v0.142.0

type WorkflowContractUpdated struct {
	*WorkflowContractBase
	NewRevisionID  *uuid.UUID `json:"new_revision_id,omitempty"`
	NewRevision    *int       `json:"new_revision,omitempty"`
	NewDescription *string    `json:"new_description,omitempty"`
}

func (*WorkflowContractUpdated) ActionInfo added in v0.142.0

func (w *WorkflowContractUpdated) ActionInfo() (json.RawMessage, error)

func (*WorkflowContractUpdated) ActionType added in v0.142.0

func (w *WorkflowContractUpdated) ActionType() string

func (*WorkflowContractUpdated) Description added in v0.142.0

func (w *WorkflowContractUpdated) Description() string

type WorkflowCreated added in v1.0.0

type WorkflowCreated struct {
	*WorkflowBase
	WorkflowContractID   *uuid.UUID `json:"workflow_contract_id,omitempty"`
	WorkflowContractName string     `json:"workflow_contract_name,omitempty"`
	WorkflowDescription  *string    `json:"description,omitempty"`
	Team                 *string    `json:"team,omitempty"`
	Public               bool       `json:"public,omitempty"`
}

func (*WorkflowCreated) ActionInfo added in v1.0.0

func (w *WorkflowCreated) ActionInfo() (json.RawMessage, error)

func (*WorkflowCreated) ActionType added in v1.0.0

func (w *WorkflowCreated) ActionType() string

func (*WorkflowCreated) Description added in v1.0.0

func (w *WorkflowCreated) Description() string

func (*WorkflowCreated) TargetID added in v1.0.0

func (w *WorkflowCreated) TargetID() *uuid.UUID

type WorkflowDeleted added in v1.0.0

type WorkflowDeleted struct {
	*WorkflowBase
}

func (*WorkflowDeleted) ActionInfo added in v1.0.0

func (w *WorkflowDeleted) ActionInfo() (json.RawMessage, error)

func (*WorkflowDeleted) ActionType added in v1.0.0

func (w *WorkflowDeleted) ActionType() string

func (*WorkflowDeleted) Description added in v1.0.0

func (w *WorkflowDeleted) Description() string

type WorkflowUpdated added in v1.0.0

type WorkflowUpdated struct {
	*WorkflowBase
	NewDescription          *string    `json:"new_description,omitempty"`
	NewTeam                 *string    `json:"new_team,omitempty"`
	NewPublic               *bool      `json:"new_public,omitempty"`
	NewWorkflowContractID   *uuid.UUID `json:"new_workflow_contract_id,omitempty"`
	NewWorkflowContractName *string    `json:"new_workflow_contract_name,omitempty"`
}

func (*WorkflowUpdated) ActionInfo added in v1.0.0

func (w *WorkflowUpdated) ActionInfo() (json.RawMessage, error)

func (*WorkflowUpdated) ActionType added in v1.0.0

func (w *WorkflowUpdated) ActionType() string

func (*WorkflowUpdated) Description added in v1.0.0

func (w *WorkflowUpdated) Description() string

Jump to

Keyboard shortcuts

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