types

package
v0.0.0-...-747a129 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	User  = "u"
	Group = "g"
)
View Source
const SEP_UID = "\u0001"

Variables

View Source
var (
	EmptyUID = UID{}
)

Some UIDs that are contacted often.

Functions

This section is empty.

Types

type ContactInfo

type ContactInfo struct {
	Uin    string
	Name   string
	Remark string
}

func NewContact

func NewContact(uin int64, name, remark string) *ContactInfo

type UID

type UID struct {
	Uin  string
	Type string
}

func NewGroupUID

func NewGroupUID(uin string) UID

func NewIntGroupUID

func NewIntGroupUID(uin int64) UID

func NewIntUserUID

func NewIntUserUID(uin int64) UID

func NewUserUID

func NewUserUID(uin string) UID

func ParseUID

func ParseUID(uid string) (UID, error)

func (UID) IntUin

func (u UID) IntUin() int64

func (UID) IsEmpty

func (u UID) IsEmpty() bool

func (UID) IsGroup

func (u UID) IsGroup() bool

func (UID) IsUser

func (u UID) IsUser() bool

func (UID) MarshalText

func (u UID) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler for UID

func (*UID) Scan

func (u *UID) Scan(src interface{}) error

Scan scans the given SQL value into this UID.

func (UID) String

func (u UID) String() string

func (*UID) UnmarshalText

func (u *UID) UnmarshalText(val []byte) error

UnmarshalText implements encoding.TextUnmarshaler for UID

func (UID) Value

func (u UID) Value() (driver.Value, error)

Value returns the string representation of the UID as a value that the SQL package can use.

Jump to

Keyboard shortcuts

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