Documentation
¶
Index ¶
- Variables
- func CopyHeader(dst http.Header, src http.Header, names ...string)
- func DigInvoke(function interface{}, opts ...dig.InvokeOption) error
- func DigProvide(constructor interface{}, opts ...dig.ProvideOption) error
- func IsNotFoundErr(err error) bool
- func Ptr[T any](t T) *T
- func RequestCBOR(ctx context.Context, cli *http.Client, method, api string, input, output any) error
- func RequestJSON(ctx context.Context, cli *http.Client, method, api string, input, output any) error
- func SliceHas[T comparable](sl []T, v T) bool
- func Unmarshal[T any](b *Bytes) (*T, error)
- type Bytes
- type ContextHTTPHeader
- type ID
- type UUID
Constants ¶
This section is empty.
Variables ¶
View Source
var ExternalHTTPClient = &http.Client{ Transport: gzhttp.Transport(externalTr), Timeout: time.Second * 15, }
View Source
var HTTPClient = &http.Client{ Transport: gzhttp.Transport(internalTr), Timeout: time.Second * 5, }
View Source
var Validator *validator.Validate
Functions ¶
func DigProvide ¶
func DigProvide(constructor interface{}, opts ...dig.ProvideOption) error
DigProvide ...
func IsNotFoundErr ¶ added in v0.6.4
func RequestCBOR ¶
func RequestJSON ¶
func SliceHas ¶ added in v0.4.0
func SliceHas[T comparable](sl []T, v T) bool
Types ¶
type Bytes ¶ added in v0.6.0
type Bytes []byte
func (Bytes) MarshalCBOR ¶ added in v0.6.0
func (Bytes) MarshalJSON ¶ added in v0.6.0
func (*Bytes) UnmarshalCBOR ¶ added in v0.6.0
func (*Bytes) UnmarshalJSON ¶ added in v0.6.0
type ContextHTTPHeader ¶
type ID ¶
var ANON ID = mustParseID("000000000000000anon0") // anonymous user
var JARVIS ID = mustParseID("0000000000000jarvis0") // system user
var ZeroID ID
func TryParseID ¶ added in v0.6.0
func (ID) MarshalCBOR ¶
func (ID) MarshalJSON ¶
func (ID) MarshalText ¶ added in v0.6.0
func (*ID) UnmarshalCBOR ¶
func (*ID) UnmarshalJSON ¶
func (*ID) UnmarshalText ¶ added in v0.6.0
type UUID ¶
func (UUID) MarshalCBOR ¶
func (UUID) MarshalText ¶
func (*UUID) UnmarshalCBOR ¶
func (*UUID) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.