types

package
v0.0.0-...-b5b3c4d Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxPrescriptionHashLen = 100
	MaxDataLen             = 100
)
View Source
var DesignHint = hint.MustNewHint("mitum-prescription-design-v0.0.1")
View Source
var PrescriptionInfoHint = hint.MustNewHint("mitum-prescription-prescription-info-v0.0.1")
View Source
var PrescriptionStatusUnmarshaller = map[string]PrescriptionStatus{
	"Null":       Null,
	"Registered": Registered,
	"Used":       Used,
}

Functions

This section is empty.

Types

type Design

type Design struct {
	hint.BaseHinter
}

func NewDesign

func NewDesign() Design

func (Design) Bytes

func (de Design) Bytes() []byte

func (*Design) DecodeBSON

func (de *Design) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Design) DecodeJSON

func (de *Design) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Design) GenerateHash

func (de Design) GenerateHash() util.Hash

func (Design) Hash

func (de Design) Hash() util.Hash

func (Design) IsValid

func (de Design) IsValid([]byte) error

func (Design) MarshalBSON

func (de Design) MarshalBSON() ([]byte, error)

func (Design) MarshalJSON

func (de Design) MarshalJSON() ([]byte, error)

type DesignBSONUnmarshaler

type DesignBSONUnmarshaler struct {
	Hint string `bson:"_hint"`
}

type DesignJSONMarshaler

type DesignJSONMarshaler struct {
	hint.BaseHinter
}

type DesignJSONUnmarshaler

type DesignJSONUnmarshaler struct {
	Hint hint.Hint `json:"_hint"`
}

type PrescriptionInfo

type PrescriptionInfo struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewPrescriptionInfo

func NewPrescriptionInfo(
	prescriptionHash string,
	prescribeDate, prepareDate, endDate uint64,
	status PrescriptionStatus,
	hospital, pharmacy string,
) PrescriptionInfo

func (PrescriptionInfo) Bytes

func (p PrescriptionInfo) Bytes() []byte

func (*PrescriptionInfo) DecodeBSON

func (p *PrescriptionInfo) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*PrescriptionInfo) DecodeJSON

func (p *PrescriptionInfo) DecodeJSON(b []byte, enc encoder.Encoder) error

func (PrescriptionInfo) EndDate

func (p PrescriptionInfo) EndDate() uint64

func (PrescriptionInfo) Equal

func (PrescriptionInfo) Hospital

func (p PrescriptionInfo) Hospital() string

func (PrescriptionInfo) IsValid

func (p PrescriptionInfo) IsValid([]byte) error

func (PrescriptionInfo) MarshalBSON

func (p PrescriptionInfo) MarshalBSON() ([]byte, error)

func (PrescriptionInfo) MarshalJSON

func (p PrescriptionInfo) MarshalJSON() ([]byte, error)

func (PrescriptionInfo) Pharmacy

func (p PrescriptionInfo) Pharmacy() string

func (PrescriptionInfo) PrepareDate

func (p PrescriptionInfo) PrepareDate() uint64

func (PrescriptionInfo) PrescribeDate

func (p PrescriptionInfo) PrescribeDate() uint64

func (PrescriptionInfo) PrescriptionHash

func (p PrescriptionInfo) PrescriptionHash() string

func (PrescriptionInfo) Status

type PrescriptionInfoBSONUnmarshaler

type PrescriptionInfoBSONUnmarshaler struct {
	Hint             string `bson:"_hint"`
	PrescriptionHash string `bson:"prescription_hash"`
	PrescribeDate    uint64 `bson:"prescribe_date"`
	PrepareDate      uint64 `bson:"prepare_date"`
	EndDate          uint64 `bson:"end_date"`
	Status           string `bson:"status"`
	Hospital         string `bson:"hospital"`
	Pharmacy         string `bson:"pharmacy"`
}

type PrescriptionInfoJSONMarshaler

type PrescriptionInfoJSONMarshaler struct {
	hint.BaseHinter
	PrescriptionHash string `json:"prescription_hash"`
	PrescribeDate    uint64 `json:"prescribe_date"`
	PrepareDate      uint64 `json:"prepare_date"`
	EndDate          uint64 `json:"end_date"`
	Status           string `json:"status"`
	Hospital         string `json:"hospital"`
	Pharmacy         string `json:"pharmacy"`
}

type PrescriptionInfoJSONUnmarshaler

type PrescriptionInfoJSONUnmarshaler struct {
	Hint             hint.Hint `json:"_hint"`
	PrescriptionHash string    `json:"prescription_hash"`
	PrescribeDate    uint64    `json:"prescribe_date"`
	PrepareDate      uint64    `json:"prepare_date"`
	EndDate          uint64    `json:"end_date"`
	Status           string    `json:"status"`
	Hospital         string    `json:"hospital"`
	Pharmacy         string    `json:"pharmacy"`
}

type PrescriptionStatus

type PrescriptionStatus uint8
const (
	Null PrescriptionStatus = iota
	Registered
	Used
)

func (PrescriptionStatus) Bytes

func (p PrescriptionStatus) Bytes() []byte

func (PrescriptionStatus) String

func (p PrescriptionStatus) String() string

Jump to

Keyboard shortcuts

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