actor

package
v0.1344.0-MLPAB2286con... Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package actor provides types that are useful for actors on an LPA.

Index

Constants

This section is empty.

Variables

View Source
var ActorTypes = Types{
	None:                        TypeNone,
	Donor:                       TypeDonor,
	Attorney:                    TypeAttorney,
	ReplacementAttorney:         TypeReplacementAttorney,
	TrustCorporation:            TypeTrustCorporation,
	ReplacementTrustCorporation: TypeReplacementTrustCorporation,
	CertificateProvider:         TypeCertificateProvider,
	PersonToNotify:              TypePersonToNotify,
	AuthorisedSignatory:         TypeAuthorisedSignatory,
	IndependentWitness:          TypeIndependentWitness,
	Voucher:                     TypeVoucher,
}
View Source
var NoVoucherDecisionValues = NoVoucherDecisionOptions{
	ProveOwnID:       ProveOwnID,
	SelectNewVoucher: SelectNewVoucher,
	WithdrawLPA:      WithdrawLPA,
	ApplyToCOP:       ApplyToCOP,
}
View Source
var PermissionValues = PermissionOptions{
	None:  PermissionNone,
	Admin: PermissionAdmin,
}
View Source
var StatusValues = StatusOptions{
	Active:    StatusActive,
	Suspended: StatusSuspended,
}

Functions

This section is empty.

Types

type LpaLink struct {
	// PK is the same as the PK for the LPA
	PK dynamo.LpaKeyType
	// SK is the subKey for the current user
	SK dynamo.SubKeyType
	// DonorKey is the donorKey for the donor
	DonorKey dynamo.LpaOwnerKeyType
	// ActorType is the type for the current user
	ActorType Type
	// UpdatedAt is set to allow this data to be queried from SKUpdatedAtIndex
	UpdatedAt time.Time
}

An LpaLink is used to join an actor to an LPA.

func (LpaLink) UserSub added in v0.1339.0

func (l LpaLink) UserSub() string

type Member added in v0.946.0

type Member struct {
	PK dynamo.OrganisationKeyType
	SK dynamo.MemberKeyType
	// CreatedAt is when the Member was created
	CreatedAt time.Time
	// UpdatedAt is when the Member was last updated
	UpdatedAt time.Time
	// ID is a unique identifier for the Member
	ID string
	// OrganisationID identifies the organisation the member belongs to
	OrganisationID string
	Email          string
	FirstNames     string
	LastName       string
	// Permission is the type of permissions assigned to the member to set available actions in an Organisation
	Permission Permission
	// Status controls access to the Organisation
	Status Status
	// LastLoggedInAt is when the Member last logged in to the service
	LastLoggedInAt time.Time
}

A Member is the association of a OneLogin user with an Organisation.

func (Member) FullName added in v0.1023.0

func (i Member) FullName() string

type MemberInvite added in v0.949.0

type MemberInvite struct {
	PK dynamo.OrganisationKeyType
	SK dynamo.MemberInviteKeyType
	// CreatedAt is when the MemberInvite was created
	CreatedAt time.Time
	// UpdatedAt is when the MemberInvite was last updated
	UpdatedAt time.Time
	// OrganisationID identifies the organisation the invite is for
	OrganisationID string
	// OrganisationName is the name of the organisation the invite is for
	OrganisationName string
	// Email is the address the new Member must sign in as for the invite
	Email      string
	FirstNames string
	LastName   string
	// Permission is the type of permissions assigned to the member to set available actions in an Organisation
	Permission Permission
	// ReferenceNumber is a unique code used to invite a Member to and Organisation
	ReferenceNumber string
}

A MemberInvite is created to allow a new Member to join an Organisation

func (MemberInvite) FullName added in v0.1005.0

func (i MemberInvite) FullName() string

func (MemberInvite) HasExpired added in v0.949.0

func (i MemberInvite) HasExpired() bool

type NoVoucherDecision added in v0.1266.0

type NoVoucherDecision uint8
const (
	ProveOwnID       NoVoucherDecision = iota + 1 // prove-own-id
	SelectNewVoucher                              // select-new-voucher
	WithdrawLPA                                   // withdraw-lpa
	ApplyToCOP                                    // apply-to-cop
)

func ParseNoVoucherDecision added in v0.1266.0

func ParseNoVoucherDecision(s string) (NoVoucherDecision, error)

func (NoVoucherDecision) Empty added in v0.1266.0

func (i NoVoucherDecision) Empty() bool

func (NoVoucherDecision) IsApplyToCOP added in v0.1266.0

func (i NoVoucherDecision) IsApplyToCOP() bool

func (NoVoucherDecision) IsProveOwnID added in v0.1266.0

func (i NoVoucherDecision) IsProveOwnID() bool

func (NoVoucherDecision) IsSelectNewVoucher added in v0.1266.0

func (i NoVoucherDecision) IsSelectNewVoucher() bool

func (NoVoucherDecision) IsWithdrawLPA added in v0.1266.0

func (i NoVoucherDecision) IsWithdrawLPA() bool

func (NoVoucherDecision) MarshalText added in v0.1266.0

func (i NoVoucherDecision) MarshalText() ([]byte, error)

func (NoVoucherDecision) String added in v0.1266.0

func (i NoVoucherDecision) String() string

func (*NoVoucherDecision) UnmarshalText added in v0.1266.0

func (i *NoVoucherDecision) UnmarshalText(text []byte) error

type NoVoucherDecisionOptions added in v0.1266.0

type NoVoucherDecisionOptions struct {
	ProveOwnID       NoVoucherDecision
	SelectNewVoucher NoVoucherDecision
	WithdrawLPA      NoVoucherDecision
	ApplyToCOP       NoVoucherDecision
}

type Organisation added in v0.946.0

type Organisation struct {
	PK, SK dynamo.OrganisationKeyType
	// CreatedAt is when the Organisation was created
	CreatedAt time.Time
	// UpdatedAt is when the Organisation was last updated
	UpdatedAt time.Time
	// DeletedAt is when the Organisation was (soft) deleted
	DeletedAt time.Time
	// ID is a unique identifier for the Organisation
	ID string
	// Name of the Organisation, this is unique across all Organisations
	Name string
}

An Organisation contains users associated with a set of permissions that work on the same set of LPAs.

type Permission added in v0.1002.0

type Permission uint8
const (
	PermissionNone  Permission = iota // none
	PermissionAdmin                   // admin
)

func ParsePermission added in v0.1002.0

func ParsePermission(s string) (Permission, error)

func (Permission) IsAdmin added in v0.1002.0

func (i Permission) IsAdmin() bool

func (Permission) IsNone added in v0.1002.0

func (i Permission) IsNone() bool

func (Permission) MarshalText added in v0.1002.0

func (i Permission) MarshalText() ([]byte, error)

func (Permission) String added in v0.1002.0

func (i Permission) String() string

func (*Permission) UnmarshalText added in v0.1095.0

func (i *Permission) UnmarshalText(text []byte) error

type PermissionOptions added in v0.1002.0

type PermissionOptions struct {
	None  Permission
	Admin Permission
}

type SameNameWarning

type SameNameWarning struct {
	// contains filtered or unexported fields
}

func NewSameNameWarning

func NewSameNameWarning(actor, matches Type, firstNames, lastName string) *SameNameWarning

func (*SameNameWarning) Format

func (*SameNameWarning) String

func (w *SameNameWarning) String() string

type Status added in v0.1040.0

type Status uint8
const (
	StatusActive    Status = iota // active
	StatusSuspended               // suspended
)

func ParseStatus added in v0.1040.0

func ParseStatus(s string) (Status, error)

func (Status) IsActive added in v0.1040.0

func (i Status) IsActive() bool

func (Status) IsSuspended added in v0.1040.0

func (i Status) IsSuspended() bool

func (Status) MarshalText added in v0.1040.0

func (i Status) MarshalText() ([]byte, error)

func (Status) String added in v0.1040.0

func (i Status) String() string

func (*Status) UnmarshalText added in v0.1095.0

func (i *Status) UnmarshalText(text []byte) error

type StatusOptions added in v0.1040.0

type StatusOptions struct {
	Active    Status
	Suspended Status
}

type Type

type Type uint8
const (
	TypeNone Type = iota
	TypeDonor
	TypeAttorney
	TypeReplacementAttorney
	TypeCertificateProvider
	TypePersonToNotify
	TypeAuthorisedSignatory
	TypeIndependentWitness
	TypeTrustCorporation
	TypeReplacementTrustCorporation
	TypeVoucher
)

func (Type) String

func (t Type) String() string

type Types

type Types struct {
	None                        Type
	Donor                       Type
	Attorney                    Type
	ReplacementAttorney         Type
	TrustCorporation            Type
	ReplacementTrustCorporation Type
	CertificateProvider         Type
	PersonToNotify              Type
	AuthorisedSignatory         Type
	IndependentWitness          Type
	Voucher                     Type
}

Directories

Path Synopsis
Package actoruid provides an identifier for the various actors on an LPA.
Package actoruid provides an identifier for the various actors on an LPA.

Jump to

Keyboard shortcuts

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