Documentation
¶
Index ¶
- func Bool(b bool) *bool
- func Byte(b byte) *byte
- func Complex128(c complex128) *complex128
- func Complex64(c complex64) *complex64
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int16(i int16) *int16
- func Int32(i int32) *int32
- func Int64(i int64) *int64
- func Int8(i int8) *int8
- func MustParseDate(date string) time.Time
- func MustParseDateTime(datetime string) time.Time
- func Rune(r rune) *rune
- func String(s string) *string
- func Time(t time.Time) *time.Time
- func UUID(u uuid.UUID) *uuid.UUID
- func Uint(u uint) *uint
- func Uint16(u uint16) *uint16
- func Uint32(u uint32) *uint32
- func Uint64(u uint64) *uint64
- func Uint8(u uint8) *uint8
- func Uintptr(u uintptr) *uintptr
- type FileParam
- type FileParamOption
- type ProtocolType
- type SameSiteType
- type TransportType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Complex128 ¶
func Complex128(c complex128) *complex128
Complex128 returns a pointer to the given complex128 value.
func MustParseDate ¶
MustParseDate attempts to parse the given string as a date time.Time, and panics upon failure.
func MustParseDateTime ¶
MustParseDateTime attempts to parse the given string as a datetime time.Time, and panics upon failure.
Types ¶
type FileParam ¶ added in v0.0.25
FileParam is a file type suitable for multipart/form-data uploads.
func NewFileParam ¶ added in v0.0.25
func NewFileParam( reader io.Reader, filename string, contentType string, opts ...FileParamOption, ) *FileParam
NewFileParam returns a *FileParam type suitable for multipart/form-data uploads. All file upload endpoints accept a simple io.Reader, which is usually created by opening a file via os.Open.
However, some endpoints require additional metadata about the file such as a specific Content-Type or custom filename. FileParam makes it easier to create the correct type signature for these endpoints.
func (*FileParam) ContentType ¶ added in v0.0.25
type FileParamOption ¶ added in v0.0.25
type FileParamOption interface {
// contains filtered or unexported methods
}
FileParamOption adapts the behavior of the FileParam. No options are implemented yet, but this interface allows for future extensibility.
type ProtocolType ¶ added in v0.0.10
type ProtocolType string
const ( ProtocolTypeDns ProtocolType = "DNS" ProtocolTypeDhcp ProtocolType = "DHCP" ProtocolTypeEcho ProtocolType = "ECHO" ProtocolTypeFtp ProtocolType = "FTP" ProtocolTypeHttp ProtocolType = "HTTP" ProtocolTypeHttps ProtocolType = "HTTPS" ProtocolTypeHttp2 ProtocolType = "HTTP2" ProtocolTypeImap ProtocolType = "IMAP" ProtocolTypeImaps ProtocolType = "IMAPS" ProtocolTypeIpmi ProtocolType = "IPMI" ProtocolTypeIpsec ProtocolType = "IPSEC" ProtocolTypeJdwp ProtocolType = "JDWP" ProtocolTypeKafka ProtocolType = "KAFKA" ProtocolTypeLdap ProtocolType = "LDAP" ProtocolTypeLdaps ProtocolType = "LDAPS" ProtocolTypeModbus ProtocolType = "MODBUS" ProtocolTypeMqtt ProtocolType = "MQTT" ProtocolTypeMssql ProtocolType = "MSSQL" ProtocolTypeMysql ProtocolType = "MYSQL" ProtocolTypeNetbios ProtocolType = "NETBIOS" ProtocolTypeNtp ProtocolType = "NTP" ProtocolTypeOracle ProtocolType = "ORACLE" ProtocolTypeOpenvpn ProtocolType = "OPENVPN" ProtocolTypePop3 ProtocolType = "POP3" ProtocolTypePop3S ProtocolType = "POP3S" ProtocolTypePostgresql ProtocolType = "POSTGRESQL" ProtocolTypeRdp ProtocolType = "RDP" ProtocolTypeRpc ProtocolType = "RPC" ProtocolTypeRedis ProtocolType = "REDIS" ProtocolTypeRsync ProtocolType = "RSYNC" ProtocolTypeRtsp ProtocolType = "RTSP" ProtocolTypeSmb ProtocolType = "SMB" ProtocolTypeSmtp ProtocolType = "SMTP" ProtocolTypeSmtps ProtocolType = "SMTPS" ProtocolTypeSnmp ProtocolType = "SNMP" ProtocolTypeSsh ProtocolType = "SSH" ProtocolTypeStun ProtocolType = "STUN" ProtocolTypeTelnet ProtocolType = "TELNET" ProtocolTypeVnc ProtocolType = "VNC" ProtocolTypeUnknown ProtocolType = "UNKNOWN" )
func NewProtocolTypeFromString ¶ added in v0.0.10
func NewProtocolTypeFromString(s string) (ProtocolType, error)
func (ProtocolType) Ptr ¶ added in v0.0.10
func (p ProtocolType) Ptr() *ProtocolType
type SameSiteType ¶
type SameSiteType string
const ( SameSiteTypeNone SameSiteType = "NONE" SameSiteTypeLax SameSiteType = "LAX" SameSiteTypeStrict SameSiteType = "STRICT" SameSiteTypeUnknown SameSiteType = "UNKNOWN" )
func NewSameSiteTypeFromString ¶
func NewSameSiteTypeFromString(s string) (SameSiteType, error)
func (SameSiteType) Ptr ¶
func (s SameSiteType) Ptr() *SameSiteType
type TransportType ¶
type TransportType string
const ( TransportTypeTcp TransportType = "TCP" TransportTypeUdp TransportType = "UDP" TransportTypeUnknown TransportType = "UNKNOWN" )
func NewTransportTypeFromString ¶
func NewTransportTypeFromString(s string) (TransportType, error)
func (TransportType) Ptr ¶
func (t TransportType) Ptr() *TransportType