Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericExample ¶
type GenericExample[T any, U comparable, V ~int] struct { A T `opt:"-"` B U C V D string }
type RedisClientOpt ¶
type RedisClientOpt struct {
// Network type to use, either tcp or unix.
// Default is tcp.
Network string
// Username to authenticate the current connection when Redis ACLs are used.
// See: https://redis.io/commands/auth.
Username string `opt:"-"`
// Password to authenticate the current connection.
// See: https://redis.io/commands/auth.
Password string
// Redis DB to select after connecting to a server.
// See: https://redis.io/commands/select.
DB int
// Dial timeout for establishing new connections.
// Default is 5 seconds.
DialTimeout time.Duration
// Timeout for socket reads.
// If timeout is reached, read commands will fail with a timeout error
// instead of blocking.
//
// Use value -1 for no timeout and 0 for default.
// Default is 3 seconds.
ReadTimeout time.Duration
// Timeout for socket writes.
// If timeout is reached, write commands will fail with a timeout error
// instead of blocking.
//
// Use value -1 for no timeout and 0 for default.
// Default is ReadTimout.
WriteTimeout time.Duration
// Maximum number of socket connections.
// Default is 10 connections per every CPU as reported by runtime.NumCPU.
PoolSize int
// TLS Config used to connect to a server.
// TLS will be negotiated only if this field is set.
TLSConfig *tls.Config
// contains filtered or unexported fields
}
type User ¶
type User struct {
Embedded `opt:"-"`
*Embedded2 `opt:"-"`
E3 Embedded3 `opt:"-"`
E4 *Embedded4 `opt:"-"`
Embedded5
*Embedded6
E7 Embedded7
E8 *Embedded8
Username string
Email string
Address // combined struct
ArrayField [4]int
SliceField []int
MapField map[string]int
PtrField *int
EmptyStructFiled struct{}
SimpleFuncField func()
ComplexFuncField func(a int)
ComplexFuncFieldV2 func() int
ComplexFuncFieldV3 func(a int) int
ComplexFuncFieldV4 func(a int) (int, error)
ChanField chan int
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.