Help us shape the future of Go! Take the 2026 Go Developer Survey

events

package
v0.138.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserType               auditor.TargetType = "User"
	UserSignedUpActionType string             = "SignedUp"
	UserLoggedInActionType string             = "LoggedIn"
)
View Source
const (
	OrgType auditor.TargetType = "Organization"
)

Variables

This section is empty.

Functions

This section is empty.

Types

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 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

Jump to

Keyboard shortcuts

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