event

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnknownEvent = iota
	MTCreated
	ATCreated
	SubtokenCreated
	TokenInfoIntrospect
	TokenInfoHistory
	TokenInfoSubtokens
	TokenInfoListMTs
	InheritedRT
	TransferCodeCreated
	TransferCodeUsed
	MTRotated
	GrantEnabled
	GrantDisabled
	GrantsListed
	SSHKeyListed
	SSHKeyAdded
)

Events for Mytokens

Variables

View Source
var AllEvents = [...]string{
	"unknown",
	"created",
	"AT_created",
	"MT_created",
	"tokeninfo_introspect",
	"tokeninfo_history",
	"tokeninfo_subtokens",
	"tokeninfo_list_mytokens",
	"inherited_RT",
	"transfer_code_created",
	"transfer_code_used",
	"token_rotated",
	"settings_grant_enabled",
	"settings_grant_disabled",
	"settings_grants_listed",
	"ssh_keys_listed",
	"ssh_key_added",
}

AllEvents hold all possible Events

Functions

This section is empty.

Types

type Event

type Event struct {
	Type    int
	Comment string
}

Event is an enum like type for events

func FromNumber

func FromNumber(number int, comment string) *Event

FromNumber creates an Event from the number

func NewEvent

func NewEvent(typ, comment string) *Event

NewEvent creates a new Event from the event string

func (*Event) Scan

func (e *Event) Scan(src interface{}) error

Scan implements the sql.Scanner interface

func (*Event) String

func (e *Event) String() string

func (*Event) Valid

func (e *Event) Valid() bool

Valid checks that Event is a defined Event

func (*Event) Value

func (e *Event) Value() (driver.Value, error)

Value implements the sql.Valuer interface

Jump to

Keyboard shortcuts

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