types

package
v0.0.0-...-d13ef2f Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// New represents a therapist user account after its initial
	// creation: it is not yet generally visible, and must be approved
	// by an administrator.
	New = iota

	// Active represents a therapist account that has been approved for
	// release by an administrator, and is now visible to all users. The
	// account may have both a public profile and a profile representing
	// pending edits.
	Active

	// Suspended represents a therapist account that an administrator
	// suspended for some reason, so that it is not visible to any users
	// apart from its owner (for editing) and administrators.
	Suspended
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovalState

type ApprovalState uint

ApprovalState is an enumerated type representing the current status of a therapist account. Accounts can be: new, active or suspended.

func (*ApprovalState) FromString

func (a *ApprovalState) FromString(s string) error

FromString does checked conversion from a string to an ApprovalState.

func (ApprovalState) MarshalJSON

func (a ApprovalState) MarshalJSON() ([]byte, error)

MarshalJSON converts an internal approval status to JSON.

func (*ApprovalState) Scan

func (a *ApprovalState) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (ApprovalState) String

func (a ApprovalState) String() string

String converts an approval state to its string representation.

func (*ApprovalState) UnmarshalJSON

func (a *ApprovalState) UnmarshalJSON(d []byte) error

UnmarshalJSON unmarshals an approval state from a JSON string.

func (ApprovalState) Value

func (a ApprovalState) Value() (driver.Value, error)

Value implements the driver.Value interface.

type TherapistType

type TherapistType uint

TherapistType is an enumerated type representing the different types of therapist: OT, physiotherapist and speech therapist.

const (
	UnknownTherapistType TherapistType = iota
	OccupationalTherapist
	Physiotherapist
	SpeechTherapist
)

TherapistType enumeration values.

func (*TherapistType) FromString

func (t *TherapistType) FromString(s string) error

FromString does checked conversion from a string to an TherapistType.

func (TherapistType) MarshalJSON

func (t TherapistType) MarshalJSON() ([]byte, error)

MarshalJSON converts an internal approval status to JSON.

func (*TherapistType) Scan

func (t *TherapistType) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (TherapistType) String

func (t TherapistType) String() string

String converts an approval state to its string representation.

func (*TherapistType) UnmarshalJSON

func (t *TherapistType) UnmarshalJSON(d []byte) error

UnmarshalJSON unmarshals an approval state from a JSON string.

func (TherapistType) Value

func (t TherapistType) Value() (driver.Value, error)

Value implements the driver.Value interface.

Jump to

Keyboard shortcuts

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