object

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHospitals

func GetHospitals(form Form, limitStr string, pageStr string) ([]map[string]string, int, error)

GetHospitals returns 24 hardcoded hospital records based on the expected form structure. Supports pagination via limitStr and pageStr.

func GetIdFromOwnerAndName

func GetIdFromOwnerAndName(owner string, name string, separator string) string

func GetOwnerAndNameFromId

func GetOwnerAndNameFromId(id string, separator string) (string, string, error)

func GetPatients

func GetPatients(form Form, limitStr string, pageStr string) ([]map[string]string, int, error)

GetPatients generates mock patient data based on the provided form definition. It returns paginated data according to limitStr and pageStr.

Parameters: - form: The form definition containing form items used to generate data fields. - limitStr: A string representing the number of records per page. - pageStr: A string representing the current page number.

Returns: - A slice of map[string]string representing the patient records. - The total number of records (always 100 for now). - An error if limitStr or pageStr cannot be parsed as integers.

Types

type ChainConfig

type ChainConfig struct {
	ChainId     string `json:"chain_id"`
	OrgId       string `json:"org_id"`
	UserKey     string `json:"user_key"`
	UserCert    string `json:"user_cert"`
	SignKey     string `json:"sign_key"`
	SignCert    string `json:"sign_cert"`
	NodeAddr    string `json:"node_addr"`
	TLSHostName string `json:"tls_host_name"`
	AuthType    string `json:"auth_type"`
	EnableTLS   bool   `json:"enable_tls"`
	CACert      string `json:"ca_cert"`
}

type ChainmakerInfo

type ChainmakerInfo struct {
	ChainConfig    ChainConfig `json:"chain_config"`
	ContractName   string      `json:"contract_name"`
	ContractMethod string      `json:"contract_method"`
	Data           string      `json:"data"`
	TxId           string      `json:"txId"`
}

type ChainmakerTxInfo

type ChainmakerTxInfo struct {
	TxId      string `json:"tx_id"`
	Block     string `json:"block"`
	BlockHash string `json:"block_hash"`
	Result    string `json:"result"`
}

func InvokeContract

func InvokeContract(chainmakerInfo ChainmakerInfo) (ChainmakerTxInfo, error)

func QueryContract

func QueryContract(chainmakerInfo ChainmakerInfo) (ChainmakerTxInfo, error)

type Form

type Form struct {
	Owner       string `xorm:"varchar(100) notnull pk" json:"owner"`
	Name        string `xorm:"varchar(100) notnull pk" json:"name"`
	CreatedTime string `xorm:"varchar(100)" json:"createdTime"`

	DisplayName string `xorm:"varchar(100)" json:"displayName"`
	Position    string `xorm:"varchar(100)" json:"position"`

	FormItems []*FormItem `xorm:"varchar(5000)" json:"formItems"`
}

type FormItem

type FormItem struct {
	Name  string `json:"name"`
	Label string `json:"label"`
	Type  string `json:"type"`
	Width string `json:"width"`
}

Jump to

Keyboard shortcuts

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