Documentation ¶
Overview ¶
Copyright 2016 PingCAP, Inc. Modified work copyright (C) 2019 The Vearch Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 The Vearch Authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreedto in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func AssembleMap(maps map[string]interface{}, split string) map[string]interface{}
- func AuthDecrypt(headerData string) (userName, password string, err error)
- func AuthEncrypt(userName, password string) string
- func BuildAddr(ip string, port uint16) string
- func BuildAddrBothString(ip string, port string) string
- func BytesPrefix(prefix []byte) ([]byte, []byte)
- func BytesToUint32(b []byte) uint32
- func BytesToUint64(b []byte) uint64
- func DrawMap(maps map[string]interface{}, split string) map[string]interface{}
- func Float64ToInt64(f float64) int64
- func GetIpFromContext(ctx context.Context) string
- func GetLocalIps() []string
- func GetOrDefault(mapinterface *map[string]interface{}, k string, dv interface{}) interface{}
- func Int64ToFloat64(i int64) float64
- func IsNum(s string) bool
- func MapContains(m map[string]interface{}, key string) bool
- func MergeMap(dest, src map[string]interface{})
- func Normalization(feature []float32) error
- func P2Bool(v *bool) bool
- func P2Float32(v *float32) float32
- func P2Float64(v *float64) float64
- func P2Int(v *int) int
- func P2Int16(v *int16) int16
- func P2Int32(v *int32) int32
- func P2Int64(v *int64) int64
- func P2Int8(v *int8) int8
- func P2Rune(v *rune) rune
- func P2Str(v *string) string
- func PBool(v bool) *bool
- func PFloat32(v float32) *float32
- func PFloat64(v float64) *float64
- func PInt(v int) *int
- func PInt16(v int16) *int16
- func PInt32(v int32) *int32
- func PInt64(v int64) *int64
- func PInt8(v int8) *int8
- func PRune(v rune) *rune
- func PStr(v string) *string
- func ParseAddr(addr string) []string
- func SliceToString(b []byte) (s string)
- func SlotSplit(start, end uint32, n uint64) []uint32
- func StringToSlice(s string) (b []byte)
- func Uint32ToBytes(v uint32) []byte
- func Uint64ToBytes(v uint64) []byte
- func WriteWithBufio(name, content string) error
- type Duration
- type Value
Constants ¶
const (
HeaderAuthBasic = "Basic "
)
const ShiftStartFlag byte = 0x20
Variables ¶
This section is empty.
Functions ¶
func AssembleMap ¶
make map to level 1 example map[a.b]=1 it will map[a][b]=1
func AuthDecrypt ¶
func AuthEncrypt ¶
func BuildAddrBothString ¶
func BytesPrefix ¶
func BytesToUint32 ¶
func BytesToUint64 ¶
func Float64ToInt64 ¶
func GetIpFromContext ¶
func GetLocalIps ¶
func GetLocalIps() []string
func GetOrDefault ¶
func Int64ToFloat64 ¶
func Normalization ¶
func SliceToString ¶
SliceToString slice to string with out data copy
func StringToSlice ¶
StringToSlice string to slice with out data copy
func Uint32ToBytes ¶
func Uint64ToBytes ¶
func WriteWithBufio ¶
Types ¶
type Duration ¶
Duration is a wrapper of time.Duration for TOML and JSON.
func NewDuration ¶
NewDuration creates a Duration from time.Duration.
func (*Duration) MarshalJSON ¶
MarshalJSON returns the duration as a JSON string.
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON parses a JSON string into the duration.
func (*Duration) UnmarshalText ¶
UnmarshalText parses a TOML string into the duration.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ioutil2 provides extra functionality along similar lines to io/ioutil.
|
Package ioutil2 provides extra functionality along similar lines to io/ioutil. |
Package metrics is a generated protocol buffer package.
|
Package metrics is a generated protocol buffer package. |
runtime
|
|
server
|
|
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
|
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. |