utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API_VERSION = "v0"
)

Variables

View Source
var (
	Realtime RealtimeSetting
	Que      QueSetting
)

Functions

func AppendStrings

func AppendStrings(strings ...string) string

func IsValidId

func IsValidId(id string) bool

Types

type JSONText

type JSONText json.RawMessage

func (JSONText) MarshalJSON

func (j JSONText) MarshalJSON() ([]byte, error)

MarshalJSON returns j as the JSON encoding of j.

func (*JSONText) Scan

func (j *JSONText) Scan(src interface{}) error

Scan stores the src in *j. No validation is done.

func (JSONText) String

func (j JSONText) String() string

Pretty printing for JSONText types

func (*JSONText) Unmarshal

func (j *JSONText) Unmarshal(v interface{}) error

Unmarshal unmarshal's the json in j to v, as in json.Unmarshal.

func (*JSONText) UnmarshalJSON

func (j *JSONText) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *j to a copy of data

func (JSONText) Value

func (j JSONText) Value() (driver.Value, error)

Value returns j as a value. This does a validating unmarshal into another RawMessage. If j is invalid json, it returns an error.

type QueSetting added in v0.2.0

type QueSetting struct {
	Port           string
	NsqlookupdHost string
	NsqlookupdPort string
	NsqdHost       string
	NsqdPort       string
	Topic          string
	Channel        string
}

type RealtimeSetting added in v0.2.0

type RealtimeSetting struct {
	Port string
}

Jump to

Keyboard shortcuts

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