utils

package
v0.0.0-...-d8258db Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIGetRequest

func APIGetRequest(token, endpoint string) ([]byte, error)

func RandAlphabetAndNumberString

func RandAlphabetAndNumberString(n int) string

RandAlphabetAndNumberString 指定した文字数のランダム英数字文字列を生成します

Types

type Int

type Int struct {
	sql.NullInt64
}

func IntFrom

func IntFrom(v int64) Int

func NewInt

func NewInt(v int64, valid bool) Int

func (Int) MarshalJSON

func (i Int) MarshalJSON() ([]byte, error)

func (Int) MarshalText

func (i Int) MarshalText() ([]byte, error)

func (*Int) UnmarshalJSON

func (i *Int) UnmarshalJSON(data []byte) error

func (*Int) UnmarshalText

func (i *Int) UnmarshalText(text []byte) error

func (Int) ValueOrZero

func (i Int) ValueOrZero() int64

type String

type String struct {
	sql.NullString
}

func NewString

func NewString(v string, valid bool) String

func StringFrom

func StringFrom(v string) String

func (String) MarshalJSON

func (s String) MarshalJSON() ([]byte, error)

func (String) MarshalText

func (s String) MarshalText() ([]byte, error)

func (*String) UnmarshalJSON

func (s *String) UnmarshalJSON(data []byte) error

func (*String) UnmarshalText

func (s *String) UnmarshalText(text []byte) error

func (String) ValueOrZero

func (s String) ValueOrZero() string

type UserMe

type UserMe struct {
	Id   uuid.UUID `json:"id"`
	Name string    `json:"name`
}

func GetUserMe

func GetUserMe(token string) (*UserMe, error)

Jump to

Keyboard shortcuts

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