Documentation ¶
Index ¶
- Constants
- func AverageElemF(vs []float64) float64
- func F64ToS(f float64) string
- func FindRegexGroups(reg *regexp.Regexp, v string) (map[string]string, error)
- func JoinInt64(elems []int64, sep string) string
- func MakeTemporary(err error) error
- func MaxElemF(vs []float64) float64
- func MaxI(a, b int) int
- func MergeErrors(priorityToError bool, err error, newErrs ...error) error
- func MinElemF(vs []float64) float64
- func MinI(a, b int) int
- func SliceByteToComplex64(b []byte) []complex64
- func SliceByteToFloat32(b []byte) []float32
- func SliceByteToFloat64(b []byte) []float64
- func SliceByteToInt16(b []byte) []int16
- func SliceByteToInt32(b []byte) []int32
- func SliceByteToInt8(b []byte) []int8
- func SliceByteToUInt16(b []byte) []uint16
- func SliceByteToUInt32(b []byte) []uint32
- func SliceFloat64Equal(a, b []float64) bool
- func SliceInt64Equal(a, b []int64) bool
- func Temporary(err error) bool
- func ToSliceByte(ptr unsafe.Pointer, l int) []byte
- func URLJoin(url string, elems ...string) string
- type ErrWaitGroup
- type StringSet
- type TokenAuth
Constants ¶
const ( // AuthorizationHeader is the header key to get the authorization token AuthorizationHeader = "authorization" // ESRIAuthorizationHeader is the header key to get the authorization token ESRIAuthorizationHeader = "X-Esri-Authorization" )
Variables ¶
This section is empty.
Functions ¶
func AverageElemF ¶
AverageElemF computes the mean value of vs.$ AverageElemF panics if len(vs) = 0
func FindRegexGroups ¶
FindRegexGroups returns a map containing the group names as keys and the values matched as values, if the string value matches the regex.
func MakeTemporary ¶
func MergeErrors ¶ added in v0.3.0
MergeErrors, appending texts if priorityToErr is true, priority to the fatal error then to the temporary else, priority to no error, then to the temporary and finally to the fatal error.
func SliceByteToComplex64 ¶
SliceByteToComplex64 converts a slice of byte to a slice of complex64
func SliceByteToFloat32 ¶
SliceByteToFloat32 converts a slice of byte to a slice of float32
func SliceByteToFloat64 ¶
SliceByteToFloat64 converts a slice of byte to a slice of float34
func SliceByteToInt16 ¶
SliceByteToInt16 converts a slice of byte to a slice of int16
func SliceByteToInt32 ¶
SliceByteToInt32 converts a slice of byte to a slice of int32
func SliceByteToInt8 ¶
SliceByteToInt8 converts a slice of byte to a slice of int8
func SliceByteToUInt16 ¶
SliceByteToUInt16 converts a slice of byte to a slice of uint16
func SliceByteToUInt32 ¶
SliceByteToUInt32 converts a slice of byte to a slice of uint32
func SliceFloat64Equal ¶
SliceFloat64Equal returns true if the two slices contain the same elements
func SliceInt64Equal ¶
SliceInt64Equal returns true if the two slices contain the same elements
func ToSliceByte ¶
ToSliceByte converts an unsafe.Pointer to a slice of byte Usage: f := []float64{1.0, 2.0, 3.0} b := ToSliceByte(unsafe.Pointer(&f[0]), len(f)*8)
Types ¶
type ErrWaitGroup ¶ added in v0.3.0
type ErrWaitGroup struct {
// contains filtered or unexported fields
}
ErrWaitGroup is a collection of goroutines working on subtasks that are part of the same overall task.
func (*ErrWaitGroup) AppendError ¶ added in v0.3.0
func (g *ErrWaitGroup) AppendError(err error)
AppendError to the list of errors
func (*ErrWaitGroup) Go ¶ added in v0.3.0
func (g *ErrWaitGroup) Go(f func() error)
Go calls the given function in a new goroutine.
func (*ErrWaitGroup) Wait ¶ added in v0.3.0
func (g *ErrWaitGroup) Wait() []error
Wait blocks until all function calls from the Go method have returned, then returns all the non-nil error (if any) from them.
type StringSet ¶
type StringSet map[string]struct{}
StringSet is a set of strings (all elements are unique)
type TokenAuth ¶
type TokenAuth struct {
Token string
}
TokenAuth to use with grpc.WithPerRPCCredentials
func (TokenAuth) Authenticate ¶
Authenticate returns nil if token is compliant with TokenAuth else GRPC Error Unauthenticated.
func (TokenAuth) GetRequestMetadata ¶
func (t TokenAuth) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
GetRequestMetadata implements grpc.PerRPCCredentials
func (TokenAuth) RequireTransportSecurity ¶
RequireTransportSecurity implements grpc.PerRPCCredentials