Documentation ¶
Index ¶
- Constants
- func JSONGetArray(data []byte, field string) []string
- func JSONGetBool(data []byte, field string, defaultValue bool) bool
- func JSONGetFloat64(data []byte, field string, defaultValue float64) float64
- func JSONGetMap(data []byte, field string) map[string]string
- func JSONGetString(data []byte, field string, defaultValue string) string
- func JSONGetUint64(data []byte, field string, def uint64) uint64
- func ToBool(v any) bool
- func ToString(v any) string
- type AdditionalExpectedResponse
- type ArrayOrString
- type ContentType
- type DataSchemaType
- type DataTime
- type Double
- type ExpectedResponse
- type Form
- type Integer
- type Link
- type MultiLanguage
- type Number
- type OP
- type URI
- type UnsignedInt
Constants ¶
View Source
const ( Readproperty OP = "readproperty" Writeproperty OP = "writeproperty" Observeproperty OP = "observeproperty" Unobserveproperty OP = "unobserveproperty" Invokeaction OP = "invokeaction" Queryaction OP = "queryaction" Cancelaction OP = "cancelaction" SubscribeEvent OP = "subscribeevent" Unsubscribeevent OP = "unsubscribeevent" Readallproperties OP = "readallproperties" Writeallproperties OP = "writeallproperties" Readmultipleproperties OP = "readmultipleproperties" Writemultipleproperties OP = "writemultipleproperties" ObserveallProperties OP = "observeallproperties" Unobserveallproperties OP = "unobserveallproperties" Subscribeallevents OP = "subscribeallevents" Unsubscribeallevents OP = "unsubscribeallevents" Queryallactions OP = "queryallactions" JSON ContentType = "application/json" LdJSON ContentType = "application/ld+json" )
Variables ¶
This section is empty.
Functions ¶
func JSONGetArray ¶
Types ¶
type ArrayOrString ¶
type ArrayOrString []string
func NewArrayOrString ¶
func NewArrayOrString(args ...string) ArrayOrString
type ContentType ¶
type ContentType = string
type DataSchemaType ¶
type DataSchemaType = string
const ( TypeNumber DataSchemaType = "number" TypeString DataSchemaType = "string" TypeInteger DataSchemaType = "integer" TypeNull DataSchemaType = "null" TypeObject DataSchemaType = "object" TypeArray DataSchemaType = "array" TypeBoolean DataSchemaType = "boolean" )
type ExpectedResponse ¶
type ExpectedResponse struct {
ContentType string
}
type Form ¶
type Form struct { Href URI `json:"href" wot:"mandatory"` ContentType ContentType `json:"contentType,omitempty" wot:"withDefault"` ContentCoding string `json:"contentCoding,omitempty" wot:"optional"` Security ArrayOrString `json:"security,omitempty" wot:"optional"` Scopes ArrayOrString `json:"scopes,omitempty" wot:"optional"` Response *ExpectedResponse `json:"response,omitempty" wot:"optional"` AdditionalResponses []AdditionalExpectedResponse `json:"additionalResponses,omitempty" wot:"optional"` Subprotocol string `json:"subprotocol,omitempty" wot:"optional"` Op []OP `json:"op,omitempty" wot:"withDefault"` }
type MultiLanguage ¶
type UnsignedInt ¶
type UnsignedInt uint
func ToUnsignedInt ¶
func ToUnsignedInt(v any) UnsignedInt
func (UnsignedInt) Compare ¶
func (i UnsignedInt) Compare(value UnsignedInt) int
Click to show internal directories.
Click to hide internal directories.