shared

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ExecKindService = "service"
)

Variables

This section is empty.

Functions

func CloneHTTPRequest added in v0.8.0

func CloneHTTPRequest(request *http.Request) (*http.Request, error)

CloneHTTPRequest clones http request

func CombineErrors added in v0.8.0

func CombineErrors(header string, errors []error) error

func Elem added in v0.2.0

func Elem(rType reflect.Type) reflect.Type

func ExpandSQL added in v0.8.0

func ExpandSQL(SQL string, args []interface{}) string

func ExtractPath added in v0.8.0

func ExtractPath(name string) (string, string)

func FirstNotEmpty added in v0.8.0

func FirstNotEmpty(values ...string) string

func KeysOf added in v0.2.0

func KeysOf(value string, removeUnderscores bool) []string

KeysOf creates keys based on given value using different strategies i.e. ToUpper, ToLower.

func MatchField added in v0.2.0

func MatchField(rType reflect.Type, name string, sourceCase text.CaseFormat) *xunsafe.Field

func TrimPair added in v0.8.0

func TrimPair(text string, begin, end byte) string

func UnmarshalWithExt added in v0.8.0

func UnmarshalWithExt(data []byte, into interface{}, ext string) error

Types

type BuiltInKey added in v0.2.0

type BuiltInKey string

BuiltInKey represents keys that are provided as parameters for every view.View in view.Session

const (
	//DataViewName represents View.DbName parameter
	DataViewName BuiltInKey = "session.View.DbName"
	//SubjectName represents PrincialSubject parameter
	SubjectName BuiltInKey = "session.PrincialSubject"
)

type Errors added in v0.2.0

type Errors struct {
	// contains filtered or unexported fields
}

Errors collect errors, supports parallel errors collecting.

func NewErrors added in v0.2.0

func NewErrors(size int) *Errors

NewErrors creates and allocates errors collector with given size

func (*Errors) Append added in v0.2.0

func (r *Errors) Append(err error)

Append appends error.

func (*Errors) Error added in v0.2.0

func (r *Errors) Error() error

Error returns first encounter error if any

type Reference added in v0.2.0

type Reference struct {
	Ref string `json:",omitempty" yaml:"ref,omitempty"`
}

Reference wraps Ref, objects with Reference can be build based on other object of the same type.

type Unmarshal added in v0.8.0

type Unmarshal func(data []byte, destination interface{}) error

Unmarshal converts data to destination, destination has to be a pointer to desired output type

Jump to

Keyboard shortcuts

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