common

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ptr

func Ptr[T any](v T) *T

func StructToMap

func StructToMap(v any) map[string]any

StructToMap converts a struct to map[string]any using its JSON tags.

Types

type Paging

type Paging struct {
	Page int
	Size int
}

type PortalUser

type PortalUser struct {
	ID string
}

type Project

type Project struct {
	ID string
}

type Tag

type Tag struct {
	Key      string `json:"key"`
	Value    string `json:"value"`
	IsEdited bool   `json:"isEdited,omitempty"`
}

func NewTags

func NewTags(kvPairs ...string) []Tag

NewTags creates a []Tag from variadic key-value string pairs. If an odd number of strings is provided, the last value defaults to "none".

type Zone

type Zone string
const (
	HCM_03_1A_ZONE     Zone = "HCM03-1A"
	HCM_03_1B_ZONE     Zone = "HCM03-1B"
	HCM_03_1C_ZONE     Zone = "HCM03-1C"
	HCM_03_BKK_01_ZONE Zone = "HCM03-BKK-01"
	HAN_01_1A_ZONE     Zone = "HAN01-1A"
)

Jump to

Keyboard shortcuts

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