Documentation ¶
Index ¶
- Constants
- Variables
- func AssertInt(v interface{}) int
- func AssertStr(v interface{}) string
- func AssertStrSlice(v interface{}) []string
- func Atoi(s string) (int, error)
- func Base64StdDecode(b64 string) ([]byte, error)
- func Base64StdEncode(p []byte) string
- func Base64UrlDecode(b64 string) ([]byte, error)
- func Base64UrlEncode(p []byte) string
- func BigIntFromBytes(p []byte) *big.Int
- func BlockPEM(p []byte, _type string) *pem.Block
- func BytesFloat32(x float32) []byte
- func BytesFloat32s(x []float32) []byte
- func BytesFloat64(x float64) []byte
- func BytesFloat64s(x []float64) []byte
- func BytesFromB58(b58 string) []byte
- func BytesFromHex(hexstr string) ([]byte, error)
- func BytesInt16(x int16) []byte
- func BytesInt16s(x []int16) []byte
- func BytesInt32(x int32) []byte
- func BytesInt32s(x []int32) []byte
- func BytesInt64(x int64) []byte
- func BytesInt64s(x []int64) []byte
- func BytesToB58(p []byte) string
- func BytesToHex(p []byte) string
- func Check(err error)
- func Checksum256(p []byte) []byte
- func Copy(w io.Writer, r io.Reader) error
- func CopySize(w io.Writer, r io.Reader) (int64, error)
- func CreateFile(path string) (*os.File, error)
- func DecodePEM(p []byte) (*pem.Block, []byte)
- func DeepEqual(x, y interface{}) bool
- func DumpCBOR(v interface{}) ([]byte, error)
- func EmptyStr(s string) bool
- func EncodePEM(b *pem.Block) []byte
- func Error(msg string) error
- func ErrorAppend(err error, msg string) error
- func ErrorJoin(err1, err2 error) error
- func Errorf(format string, args ...interface{}) error
- func EvenSquare(n int) bool
- func Exp2(x int) int
- func FillStruct(s interface{}, data map[string]interface{}) (err error)
- func Float32(p []byte) (float32, error)
- func Float32s(p []byte) ([]float32, error)
- func Float64(p []byte) (float64, error)
- func Float64s(p []byte) ([]float64, error)
- func FormatInt(x int64, base int) string
- func FormatInt64(x int64, base int) string
- func GetMyIP() (string, error)
- func Getenv(key string) string
- func HttpGet(url string) (*http.Response, error)
- func HttpGetRequest(url string, body io.Reader, kv map[string]string) (*http.Response, error)
- func HttpPost(url, bodyType string, body io.Reader) (*http.Response, error)
- func HttpPostRequest(url string, body io.Reader, kv map[string]string) (*http.Response, error)
- func HttpRequest(method, url string, body io.Reader, kv map[string]string) (*http.Response, error)
- func HttpsClient() *http.Client
- func HttpsTransport() *http.Transport
- func Int16(p []byte) (int16, error)
- func Int16s(p []byte) ([]int16, error)
- func Int32(p []byte) (x int32, err error)
- func Int32s(p []byte) ([]int32, error)
- func Int64(p []byte) (int64, error)
- func Int64s(p []byte) ([]int64, error)
- func Itoa(x int) string
- func LoadCBOR(p []byte, v interface{}) error
- func Log2Ceil(x int) int
- func Log2Floor(x int) int
- func MarshalIndentJSON(v interface{}) ([]byte, error)
- func MarshalJSON(v interface{}) ([]byte, error)
- func Match(pattern string, p []byte) bool
- func MatchStr(pattern, s string) bool
- func MatchUrlRelaxed(rawurl string) bool
- func MatchUrlStrict(rawurl string) bool
- func MustAtoi(s string) int
- func MustBase64StdDecode(b64 string) []byte
- func MustBase64UrlDecode(b64 string) []byte
- func MustBytesFromHex(hexstr string) []byte
- func MustCopy(w io.Writer, r io.Reader)
- func MustCreateFile(path string) *os.File
- func MustDumpCBOR(v interface{}) []byte
- func MustLoadCBOR(p []byte, v interface{})
- func MustMarshalIndentJSON(v interface{}) []byte
- func MustMarshalJSON(v interface{}) []byte
- func MustOpenFile(path string) *os.File
- func MustOpenWriteFile(path string) *os.File
- func MustParseInt64(s string, base int) int64
- func MustParseQuery(query string) url.Values
- func MustParseUint16(s string, base int) int
- func MustParseUint32(s string, base int) int
- func MustParseUint64(s string, base int) int
- func MustParseUrl(rawurl string) *url.URL
- func MustPeek(r io.Reader) byte
- func MustReadAll(r io.Reader) []byte
- func MustReadFile(path string) []byte
- func MustReadFull(r io.Reader, buf []byte)
- func MustReadJSON(r io.Reader, v interface{})
- func MustReadN(r io.Reader, n int) []byte
- func MustReadSeeker(r io.Reader) io.ReadSeeker
- func MustReadUint16(r io.Reader) int
- func MustReadUint32(r io.Reader) int
- func MustReadUint64(r io.Reader) int
- func MustReadVarOctet(r io.Reader) []byte
- func MustReadVarUint(r io.Reader) int
- func MustSetenv(key, value string)
- func MustTeeSeeker(r io.Reader) (io.ReadSeeker, io.Reader)
- func MustUint16(p []byte) int
- func MustUint32(p []byte) int
- func MustUint64(p []byte) int
- func MustUnmarshalJSON(p []byte, v interface{})
- func MustVarOctetBytes(octet []byte) []byte
- func MustVarUint(octet []byte) int
- func MustWrite(p []byte, w io.Writer)
- func MustWriteJSON(w io.Writer, v interface{})
- func Now() time.Time
- func OpenFile(path string) (*os.File, error)
- func OpenWriteFile(path string) (*os.File, error)
- func Panicf(format string, args ...interface{})
- func ParseBool(s string) (bool, error)
- func ParseDate(date string) (time.Time, error)
- func ParseInt32(s string, base int) (int32, error)
- func ParseInt64(s string, base int) (int64, error)
- func ParseQuery(query string) (url.Values, error)
- func ParseUint16(s string, base int) (int, error)
- func ParseUint32(s string, base int) (int, error)
- func ParseUint64(s string, base int) (int, error)
- func ParseUrl(rawurl string) (*url.URL, error)
- func Peek(r io.Reader) (byte, error)
- func Pipe() (r io.Reader, w io.Writer)
- func Pow2(x int) bool
- func Pow2Ceil(x int) int
- func Pow2Floor(x int) int
- func PrintJSON(v interface{})
- func PrintNewlines(n int)
- func ReadAll(r io.Reader) ([]byte, error)
- func ReadFile(path string) ([]byte, error)
- func ReadFloat32(r io.Reader) (x float32, err error)
- func ReadFloat32s(r io.Reader, seg int) (x []float32, err error)
- func ReadFloat64(r io.Reader) (x float64, err error)
- func ReadFloat64s(r io.Reader, seg int) (x []float64, err error)
- func ReadFull(r io.Reader, buf []byte) error
- func ReadInt16(r io.Reader) (x int16, err error)
- func ReadInt16s(r io.Reader, seg int) (x []int16, err error)
- func ReadInt32(r io.Reader) (x int32, err error)
- func ReadInt32s(r io.Reader, seg int) (x []int32, err error)
- func ReadInt64(r io.Reader) (x int64, err error)
- func ReadInt64s(r io.Reader, seg int) (x []int64, err error)
- func ReadJSON(r io.Reader, v interface{}) error
- func ReadN(r io.Reader, n int) ([]byte, error)
- func ReadNFloat32s(r io.Reader, n int) ([]float32, error)
- func ReadNFloat64s(r io.Reader, n int) ([]float64, error)
- func ReadNInt16s(r io.Reader, n int) ([]int16, error)
- func ReadNInt32s(r io.Reader, n int) ([]int32, error)
- func ReadNInt64s(r io.Reader, n int) ([]int64, error)
- func ReadSeeker(r io.Reader) (io.ReadSeeker, error)
- func ReadUint16(r io.Reader) (int, error)
- func ReadUint32(r io.Reader) (int, error)
- func ReadUint64(r io.Reader) (int, error)
- func ReadVarOctet(r io.Reader) (octet []byte, err error)
- func ReadVarUint(r io.Reader) (int, error)
- func RepeatStr(s string, n int) string
- func SetField(s interface{}, name string, value interface{}) error
- func Setenv(key, value string) error
- func Shake256(p []byte, size int) []byte
- func SleepMilli(d time.Duration)
- func SleepSeconds(d time.Duration)
- func SplitStr(s, sep string) []string
- func StructToMap(s interface{}) map[string]interface{}
- func Submatch(pattern string, p []byte) [][]byte
- func SubmatchStr(pattern, s string) []string
- func Tee(r io.Reader, w io.Writer) io.Reader
- func TeeSeeker(r io.Reader) (io.ReadSeeker, io.Reader, error)
- func Timestamp() int64
- func TimestampBytes(x int64) []byte
- func TimestampFromBytes(p []byte) int64
- func ToLower(s string) string
- func Today() time.Time
- func TypeOf(i interface{}) string
- func Uint16(p []byte) (int, error)
- func Uint16Bytes(x int) []byte
- func Uint32(p []byte) (int, error)
- func Uint32Bytes(x int) []byte
- func Uint64(p []byte) (int, error)
- func Uint64Bytes(x int) []byte
- func UnmarshalJSON(p []byte, v interface{}) error
- func VarOctet(p []byte) (octet []byte)
- func VarOctetBytes(octet []byte) ([]byte, error)
- func VarOctetLength(p []byte) int
- func VarUint(octet []byte) (int, error)
- func VarUintBytes(x int) []byte
- func VarUintSize(x int) int
- func Write(p []byte, w io.Writer) error
- func WriteFloat32(w io.Writer, x float32) (err error)
- func WriteFloat32s(w io.Writer, x []float32) (err error)
- func WriteFloat64(w io.Writer, x float64) (err error)
- func WriteFloat64s(w io.Writer, x []float64) (err error)
- func WriteInt16(w io.Writer, x int16) (err error)
- func WriteInt16s(w io.Writer, x []int16) (err error)
- func WriteInt32(w io.Writer, x int32) (err error)
- func WriteInt32s(w io.Writer, x []int32) (err error)
- func WriteInt64(w io.Writer, x int64) (err error)
- func WriteInt64s(w io.Writer, x []int64) (err error)
- func WriteJSON(w io.Writer, v interface{}) error
- func WriteUint16(w io.Writer, x int)
- func WriteUint32(w io.Writer, x int)
- func WriteUint64(w io.Writer, x int)
- func WriteVarOctet(w io.Writer, p []byte)
- func WriteVarUint(w io.Writer, x int)
- type Data
- func (d Data) Clear(key string)
- func (d Data) Delete(key string)
- func (d Data) Get(key string) interface{}
- func (d Data) GetData(key string) Data
- func (d Data) GetDataSlice(key string) []Data
- func (d Data) GetInt(key string) int
- func (d Data) GetStr(key string) string
- func (d Data) GetStrSlice(key string) []string
- func (d Data) Set(key string, value interface{})
- type Files
- type Logger
Constants ¶
View Source
const MSB = 0x80
View Source
const SEG = 1024
Variables ¶
View Source
var ( ErrInvalidCondition = Error("Invalid condition") ErrInvalidFulfillment = Error("Invalid fulfillment") ErrInvalidId = Error("Invalid id") ErrInvalidKey = Error("Invalid key") ErrInvalidSignature = Error("Invalid signature") ErrInvalidSize = Error("Invalid size") ErrInvalidType = Error("Invalid type") )
View Source
var FPrintf = fmt.Fprintf
View Source
var FPrintln = fmt.Fprintln
View Source
var NewSha256 = sha3.New256
View Source
var Print = fmt.Print
View Source
var Printf = fmt.Printf
View Source
var Println = fmt.Println
View Source
var Sprintf = fmt.Sprintf
View Source
var Stdout = os.Stdout
Functions ¶
func AssertStrSlice ¶
func AssertStrSlice(v interface{}) []string
func Base64StdDecode ¶
func Base64StdEncode ¶
func Base64UrlDecode ¶
func BigIntFromBytes ¶
func BytesFloat32 ¶
func BytesFloat32s ¶
func BytesFloat64 ¶
func BytesFloat64s ¶
func BytesFromB58 ¶
func BytesFromHex ¶
func BytesInt16 ¶
func BytesInt16s ¶
func BytesInt32 ¶
func BytesInt32s ¶
func BytesInt64 ¶
func BytesInt64s ¶
func Checksum256 ¶
func ErrorAppend ¶
func EvenSquare ¶
func FillStruct ¶
func FormatInt64 ¶
func HttpGetRequest ¶
func HttpPostRequest ¶
func HttpRequest ¶
func HttpsClient ¶
func HttpsTransport ¶
func MarshalIndentJSON ¶
func MatchUrlRelaxed ¶
func MatchUrlStrict ¶
func MustBase64StdDecode ¶
func MustBase64UrlDecode ¶
func MustBytesFromHex ¶
func MustCreateFile ¶
func MustDumpCBOR ¶
func MustDumpCBOR(v interface{}) []byte
func MustLoadCBOR ¶
func MustLoadCBOR(p []byte, v interface{})
func MustMarshalIndentJSON ¶
func MustMarshalIndentJSON(v interface{}) []byte
func MustMarshalJSON ¶
func MustMarshalJSON(v interface{}) []byte
func MustOpenFile ¶
func MustOpenWriteFile ¶
func MustParseInt64 ¶
func MustParseQuery ¶
func MustParseUint16 ¶
func MustParseUint32 ¶
func MustParseUint64 ¶
func MustParseUrl ¶
func MustReadAll ¶
func MustReadFile ¶
func MustReadFull ¶
func MustReadJSON ¶
func MustReadSeeker ¶
func MustReadSeeker(r io.Reader) io.ReadSeeker
func MustReadUint16 ¶
func MustReadUint32 ¶
func MustReadUint64 ¶
func MustReadVarOctet ¶
func MustReadVarUint ¶
func MustSetenv ¶
func MustSetenv(key, value string)
func MustTeeSeeker ¶
func MustUint16 ¶
func MustUint32 ¶
func MustUint64 ¶
func MustUnmarshalJSON ¶
func MustUnmarshalJSON(p []byte, v interface{})
func MustVarOctetBytes ¶
func MustVarUint ¶
func MustWriteJSON ¶
func PrintNewlines ¶
func PrintNewlines(n int)
func ReadSeeker ¶
func ReadSeeker(r io.Reader) (io.ReadSeeker, error)
func SleepMilli ¶
func SleepSeconds ¶
func StructToMap ¶
func StructToMap(s interface{}) map[string]interface{}
func SubmatchStr ¶
func TimestampBytes ¶
func TimestampFromBytes ¶
func Uint16Bytes ¶
func Uint32Bytes ¶
func Uint64Bytes ¶
func UnmarshalJSON ¶
func VarOctetBytes ¶
func VarOctetLength ¶
func VarUintBytes ¶
func VarUintSize ¶
func WriteUint16 ¶
func WriteUint32 ¶
func WriteUint64 ¶
func WriteVarOctet ¶
func WriteVarUint ¶
Types ¶
type Data ¶
type Data map[string]interface{}
func AssertData ¶
func AssertData(v interface{}) Data
func AssertDataSlice ¶
func AssertDataSlice(v interface{}) []Data
func (Data) GetDataSlice ¶
func (Data) GetStrSlice ¶
Click to show internal directories.
Click to hide internal directories.