supporterdata

package
v0.1495.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 Member

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

func (i Member) FullName() string

type MemberInvite

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

func (i MemberInvite) FullName() string

func (MemberInvite) HasExpired

func (i MemberInvite) HasExpired() bool

type Organisation

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

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

func ParsePermission

func ParsePermission(s string) (Permission, error)

func (Permission) IsAdmin

func (i Permission) IsAdmin() bool

func (Permission) IsNone

func (i Permission) IsNone() bool

func (Permission) MarshalText

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

func (Permission) String

func (i Permission) String() string

func (*Permission) UnmarshalText

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

type PermissionOptions

type PermissionOptions struct {
	None  Permission
	Admin Permission
}

type Status

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

func ParseStatus

func ParseStatus(s string) (Status, error)

func (Status) IsActive

func (i Status) IsActive() bool

func (Status) IsSuspended

func (i Status) IsSuspended() bool

func (Status) MarshalText

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

func (Status) String

func (i Status) String() string

func (*Status) UnmarshalText

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

type StatusOptions

type StatusOptions struct {
	Active    Status
	Suspended Status
}

Jump to

Keyboard shortcuts

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