task

package
v0.1361.0 Latest Latest
Warning

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

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

Documentation

Overview

Package task provides types to describe the different states a tasklist task can be in.

Index

Constants

This section is empty.

Variables

View Source
var IdentityStateValues = IdentityStateOptions{
	NotStarted: IdentityStateNotStarted,
	InProgress: IdentityStateInProgress,
	Pending:    IdentityStatePending,
	Problem:    IdentityStateProblem,
	Completed:  IdentityStateCompleted,
}
View Source
var PaymentStateValues = PaymentStateOptions{
	NotStarted:           PaymentStateNotStarted,
	InProgress:           PaymentStateInProgress,
	Pending:              PaymentStatePending,
	Approved:             PaymentStateApproved,
	Denied:               PaymentStateDenied,
	MoreEvidenceRequired: PaymentStateMoreEvidenceRequired,
	Completed:            PaymentStateCompleted,
}

Functions

This section is empty.

Types

type IdentityState

type IdentityState uint8
const (
	IdentityStateNotStarted IdentityState = iota
	IdentityStateInProgress
	IdentityStatePending
	IdentityStateProblem
	IdentityStateCompleted
)

func ParseIdentityState

func ParseIdentityState(s string) (IdentityState, error)

func (IdentityState) IsCompleted

func (i IdentityState) IsCompleted() bool

func (IdentityState) IsInProgress

func (i IdentityState) IsInProgress() bool

func (IdentityState) IsNotStarted

func (i IdentityState) IsNotStarted() bool

func (IdentityState) IsPending

func (i IdentityState) IsPending() bool

func (IdentityState) IsProblem

func (i IdentityState) IsProblem() bool

func (IdentityState) MarshalText

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

func (IdentityState) String

func (i IdentityState) String() string

func (*IdentityState) UnmarshalText

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

type IdentityStateOptions

type IdentityStateOptions struct {
	NotStarted IdentityState
	InProgress IdentityState
	Pending    IdentityState
	Problem    IdentityState
	Completed  IdentityState
}

type Localizer added in v0.1357.0

type Localizer interface {
	Concat(list []string, joiner string) string
	Count(messageID string, count int) string
	Format(messageID string, data map[string]interface{}) string
	FormatCount(messageID string, count int, data map[string]any) string
	FormatDate(t date.TimeOrDate) string
	FormatTime(t time.Time) string
	FormatDateTime(t time.Time) string
	Possessive(s string) string
	SetShowTranslationKeys(s bool)
	ShowTranslationKeys() bool
	T(messageID string) string
}

type PaymentState

type PaymentState uint8
const (
	PaymentStateNotStarted PaymentState = iota
	PaymentStateInProgress
	PaymentStatePending
	PaymentStateApproved
	PaymentStateDenied
	PaymentStateMoreEvidenceRequired
	PaymentStateCompleted
)

func ParsePaymentState

func ParsePaymentState(s string) (PaymentState, error)

func (PaymentState) IsApproved

func (i PaymentState) IsApproved() bool

func (PaymentState) IsCompleted

func (i PaymentState) IsCompleted() bool

func (PaymentState) IsDenied

func (i PaymentState) IsDenied() bool

func (PaymentState) IsInProgress

func (i PaymentState) IsInProgress() bool

func (PaymentState) IsMoreEvidenceRequired

func (i PaymentState) IsMoreEvidenceRequired() bool

func (PaymentState) IsNotStarted

func (i PaymentState) IsNotStarted() bool

func (PaymentState) IsPending

func (i PaymentState) IsPending() bool

func (PaymentState) MarshalText

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

func (PaymentState) String

func (i PaymentState) String() string

func (*PaymentState) UnmarshalText

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

type PaymentStateOptions

type PaymentStateOptions struct {
	NotStarted           PaymentState
	InProgress           PaymentState
	Pending              PaymentState
	Approved             PaymentState
	Denied               PaymentState
	MoreEvidenceRequired PaymentState
	Completed            PaymentState
}

type Progress added in v0.1357.0

type Progress struct {
	Paid                      ProgressTask
	ConfirmedID               ProgressTask
	DonorSigned               ProgressTask
	CertificateProviderSigned ProgressTask
	AttorneysSigned           ProgressTask
	LpaSubmitted              ProgressTask
	NoticesOfIntentSent       ProgressTask
	StatutoryWaitingPeriod    ProgressTask
	LpaRegistered             ProgressTask
	// contains filtered or unexported fields
}

func (Progress) ToSlice added in v0.1357.0

func (p Progress) ToSlice() []ProgressTask

type ProgressTask added in v0.1357.0

type ProgressTask struct {
	State State
	Label string
}

type ProgressTracker added in v0.1357.0

type ProgressTracker struct {
	Localizer Localizer
}

func (ProgressTracker) Progress added in v0.1357.0

func (pt ProgressTracker) Progress(lpa *lpadata.Lpa) Progress

type State

type State uint8
const (
	StateNotStarted State = iota
	StateInProgress
	StateCompleted
)

func (State) Completed

func (t State) Completed() bool

func (State) InProgress

func (t State) InProgress() bool

func (State) NotStarted

func (t State) NotStarted() bool

func (State) String

func (t State) String() string

Jump to

Keyboard shortcuts

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