Documentation
¶
Index ¶
- Constants
- Variables
- func Float32ToFloat64(value float32) float64
- func Float64ToFloat32(value float64) float32
- func FormatFloat(value float64, precision int, trimZero bool) string
- func StringComparer(a, b string) bool
- type ArithmeticProgression
- type ByteSize
- type ByteWriter
- type BytesBoundedBuffer
- type BytesRingBuffer
- type BytesTruncatedBuffer
- type CommaSeparatedValueRecord
- type CsvRecord
- type Float32Vector
- func (vector Float32Vector) Dim() int
- func (vector Float32Vector) Empty() bool
- func (vector Float32Vector) EnsureDim(dim int) Float32Vector
- func (vector Float32Vector) Float32() Float32Vector
- func (vector Float32Vector) Float64() Float64Vector
- func (vector Float32Vector) IsNil() bool
- func (vector Float32Vector) Len() int
- func (vector Float32Vector) Native() []float32
- type Float32Vectors
- func (vectors Float32Vectors) EnsureDim(dim int) Float32Vectors
- func (vectors Float32Vectors) FirstOneOrNil() Float32Vector
- func (vectors Float32Vectors) Float32() Float32Vectors
- func (vectors Float32Vectors) Float64() Float64Vectors
- func (vectors Float32Vectors) Len() int
- func (vectors Float32Vectors) Native() [][]float32
- func (vectors Float32Vectors) PurgeEmpty() Float32Vectors
- func (vectors Float32Vectors) PurgeNil() Float32Vectors
- type Float64Vector
- func (vector Float64Vector) Dim() int
- func (vector Float64Vector) Empty() bool
- func (vector Float64Vector) EnsureDim(dim int) Float64Vector
- func (vector Float64Vector) Float32() Float32Vector
- func (vector Float64Vector) Float64() Float64Vector
- func (vector Float64Vector) IsNil() bool
- func (vector Float64Vector) Len() int
- func (vector Float64Vector) Native() []float64
- type Float64Vectors
- func (vectors Float64Vectors) EnsureDim(dim int) Float64Vectors
- func (vectors Float64Vectors) FirstOneOrNil() Float64Vector
- func (vectors Float64Vectors) Float32() Float32Vectors
- func (vectors Float64Vectors) Float64() Float64Vectors
- func (vectors Float64Vectors) Len() int
- func (vectors Float64Vectors) Native() [][]float64
- func (vectors Float64Vectors) PurgeEmpty() Float64Vectors
- func (vectors Float64Vectors) PurgeNil() Float64Vectors
- type FloatVector
- type FloatVectors
- type JsonAny
- type JsonArray
- type JsonMap
- type JsonObject
- type KeyStringPair
- type KeyStringsPairs
- type Number
- type Pagination
- func (pagination *Pagination) Dup() *Pagination
- func (pagination *Pagination) GetLimit() int64
- func (pagination *Pagination) GetSkip() int64
- func (pagination *Pagination) ItemsUpToCurrentPage() int64
- func (pagination *Pagination) WithDefault() *Pagination
- func (pagination *Pagination) WithItems(items int64) *Pagination
- type ResponseResult
- type SequenceNumber
- type SmartJsonMap
- func (m SmartJsonMap) BatchMerge(others ...SmartJsonMap) SmartJsonMap
- func (m SmartJsonMap) Contains(key string) (ok bool)
- func (m SmartJsonMap) Dup() SmartJsonMap
- func (m SmartJsonMap) Empty() bool
- func (m SmartJsonMap) Keys() Strings
- func (m SmartJsonMap) Len() int
- func (m SmartJsonMap) Merge(other SmartJsonMap) SmartJsonMap
- func (m SmartJsonMap) Self() SmartJsonMap
- func (m SmartJsonMap) ValuesByKeys(keys []string) []JsonAny
- func (m SmartJsonMap) With(key string, value any) SmartJsonMap
- type SmartJsonMaps
- type String
- type StringSet
- type StringSlice
- type StringWriter
- type Strings
- func (strs Strings) AllMatch(test func(string) bool) bool
- func (strs Strings) AnyHasPrefix(prefix string) bool
- func (strs Strings) AnyHasSuffix(suffix string) bool
- func (strs Strings) AnyMatch(test func(string) bool) bool
- func (strs Strings) Append(more ...string) Strings
- func (strs Strings) Concat(others ...Strings) Strings
- func (strs Strings) Contain(str string) bool
- func (strs Strings) Count() stl.Counter[string]
- func (strs Strings) Dup() Strings
- func (strs Strings) Empty() bool
- func (strs Strings) EnsureNotNil() Strings
- func (strs Strings) Equal(other Strings) bool
- func (strs Strings) Filter(filter func(string) bool) Strings
- func (strs Strings) FirstOneOrZero() string
- func (strs Strings) ForEach(handler func(string))
- func (strs Strings) ForEachPro(handler func(int, string, Strings))
- func (strs Strings) IndexOf(str string) int
- func (strs Strings) InplaceShuffle() Strings
- func (strs Strings) InplaceShufflePro(rand_ *rand.Rand) Strings
- func (strs Strings) InplaceSort() Strings
- func (strs Strings) ItemsUnique() bool
- func (strs Strings) Join(sep string) string
- func (strs Strings) JoinByComma() string
- func (strs Strings) JoinByDot() string
- func (strs Strings) JoinByEmptyLine() string
- func (strs Strings) JoinByMarkdownSplitLine() string
- func (strs Strings) JoinByNewLine() string
- func (strs Strings) LastOneOrZero() string
- func (strs Strings) Len() int
- func (strs Strings) Map(mapper func(string) string) Strings
- func (strs Strings) MapWithSprintf(format string) Strings
- func (strs Strings) Native() StringSlice
- func (strs Strings) Purge(filter func(string) bool) Strings
- func (strs Strings) PurgeStringSet(set StringSet) Strings
- func (strs Strings) PurgeStrings(others Strings) Strings
- func (strs Strings) PurgeZero() Strings
- func (strs Strings) RandomOneOrZero() string
- func (strs Strings) RandomOneOrZeroPro(rand_ *rand.Rand) string
- func (strs Strings) ReverseDup() Strings
- func (strs Strings) ReverseInplace() Strings
- func (strs Strings) SliceOfAny() []any
- func (strs Strings) Sort() Strings
- func (strs Strings) Split(seps ...string) Strings
- func (strs Strings) StableUniqueBySet() Strings
- func (strs Strings) ToLower() Strings
- func (strs Strings) ToSet() StringSet
- func (strs Strings) ToUpper() Strings
- func (strs Strings) TrimPrefix(prefix string) Strings
- func (strs Strings) TrimSpace() Strings
- func (strs Strings) TrimSuffix(suffix string) Strings
- func (strs Strings) Unique() Strings
- func (strs Strings) UniqueByInplaceSort() Strings
- func (strs Strings) UniqueBySet() Strings
- func (strs Strings) UniqueBySort() Strings
- func (strs Strings) UniqueSorteds() Strings
- type StringsMapping
- type StringsMappingByString
- type TypedResponseResult
- func NewBlankTypedResponseResult[T any]() *TypedResponseResult[T]
- func NewTypedResponseResult[T any](success bool, code int, err string, message string, data T, ...) *TypedResponseResult[T]
- func NewTypedResponseResultFromData[T any](data T) *TypedResponseResult[T]
- func NewTypedResponseResultFromError[T any](code int, err error, msg string) *TypedResponseResult[T]
- func NewTypedResponseResultFromPagedData[T any](datas T, pagination *Pagination) *TypedResponseResult[T]
- func NewTypedResponseResultFromPagedDatas[Datas ~[]Data, Data any](datas Datas, pagination *Pagination) *TypedResponseResult[Datas]
- func (result *TypedResponseResult[T]) Dup() *TypedResponseResult[T]
- func (result *TypedResponseResult[T]) GetData() (t T)
- func (result *TypedResponseResult[T]) GetError() error
- func (result *TypedResponseResult[T]) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (result *TypedResponseResult[T]) SetCode(code int)
- func (result *TypedResponseResult[T]) SetData(data T)
- func (result *TypedResponseResult[T]) SetError(err string)
- func (result *TypedResponseResult[T]) SetMessage(msg string)
- func (result *TypedResponseResult[T]) SetSuccess(success bool)
- func (result TypedResponseResult[T]) SwaggerDoc() map[string]string
- func (result *TypedResponseResult[T]) TemplateFuncs() template.FuncMap
- func (result *TypedResponseResult[T]) TemplateWithFuncs() template.FuncMap
- func (result *TypedResponseResult[T]) TemplateWithSetFuncs() template.FuncMap
- func (result *TypedResponseResult[T]) WithCode(code int) *TypedResponseResult[T]
- func (result *TypedResponseResult[T]) WithData(data T) *TypedResponseResult[T]
- func (result *TypedResponseResult[T]) WithError(err string) *TypedResponseResult[T]
- func (result *TypedResponseResult[T]) WithFail(code int, err, msg string) *TypedResponseResult[T]
- func (result *TypedResponseResult[T]) WithMessage(msg string) *TypedResponseResult[T]
- func (result *TypedResponseResult[T]) WithSuccess(success bool) *TypedResponseResult[T]
- func (result *TypedResponseResult[T]) WithSuccessData(data T) *TypedResponseResult[T]
- func (result *TypedResponseResult[T]) WithSuccessPagedData(data T, pagination *Pagination) *TypedResponseResult[T]
- func (result *TypedResponseResult[T]) WriteHttpResponse(w http.ResponseWriter) error
- func (result *TypedResponseResult[T]) WriteHttpResponseWithStatus(w http.ResponseWriter, statusCode int) error
Constants ¶
View Source
const (
DefaultPageSize = 20
)
Variables ¶
View Source
var ( NewBlankResponseResult = NewBlankTypedResponseResult[any] NewResponseResult = NewTypedResponseResult[any] NewResponseResultFromData = NewTypedResponseResultFromData[any] NewResponseResultFromError = NewTypedResponseResultFromError[any] NewResponseResultFromPagedData = NewTypedResponseResultFromPagedData[any] )
Functions ¶
func Float32ToFloat64 ¶ added in v1.0.74
func Float64ToFloat32 ¶ added in v1.0.74
func FormatFloat ¶ added in v1.1.6
func StringComparer ¶
Types ¶
type ArithmeticProgression ¶ added in v1.0.65
type ArithmeticProgression[T Number] struct { // contains filtered or unexported fields }
func NewArithmeticProgression ¶ added in v1.0.65
func NewArithmeticProgression[T Number](start, delta T) *ArithmeticProgression[T]
func (*ArithmeticProgression[T]) Current ¶ added in v1.0.65
func (ap *ArithmeticProgression[T]) Current() T
func (*ArithmeticProgression[T]) Next ¶ added in v1.0.65
func (ap *ArithmeticProgression[T]) Next() T
type BytesBoundedBuffer ¶ added in v1.0.95
type BytesBoundedBuffer = stl.BoundedBuffer[[]byte, byte]
func NewBytesBoundedBuffer ¶ added in v1.0.95
func NewBytesBoundedBuffer(size int) *BytesBoundedBuffer
type BytesRingBuffer ¶ added in v1.0.95
type BytesRingBuffer = stl.RingBuffer[[]byte, byte]
func NewBytesRingBuffer ¶ added in v1.0.95
func NewBytesRingBuffer(size int) *BytesRingBuffer
type BytesTruncatedBuffer ¶ added in v1.0.95
type BytesTruncatedBuffer = stl.TruncatedBuffer[[]byte, byte]
func NewBytesTruncatedBuffer ¶ added in v1.0.95
func NewBytesTruncatedBuffer(size int) *BytesTruncatedBuffer
type CommaSeparatedValueRecord ¶ added in v1.0.67
type CommaSeparatedValueRecord string
func (CommaSeparatedValueRecord) Native ¶ added in v1.0.67
func (s CommaSeparatedValueRecord) Native() string
func (CommaSeparatedValueRecord) Read ¶ added in v1.1.6
func (s CommaSeparatedValueRecord) Read() (Strings, error)
func (CommaSeparatedValueRecord) Reader ¶ added in v1.1.6
func (s CommaSeparatedValueRecord) Reader() *csv.Reader
func (CommaSeparatedValueRecord) ValidValues ¶ added in v1.0.67
func (s CommaSeparatedValueRecord) ValidValues() Strings
func (CommaSeparatedValueRecord) Values ¶ added in v1.0.67
func (s CommaSeparatedValueRecord) Values() Strings
type CsvRecord ¶ added in v1.0.67
type CsvRecord = CommaSeparatedValueRecord
type Float32Vector ¶ added in v1.0.74
type Float32Vector []float32
func (Float32Vector) Dim ¶ added in v1.0.74
func (vector Float32Vector) Dim() int
func (Float32Vector) Empty ¶ added in v1.0.74
func (vector Float32Vector) Empty() bool
func (Float32Vector) EnsureDim ¶ added in v1.1.8
func (vector Float32Vector) EnsureDim(dim int) Float32Vector
func (Float32Vector) Float32 ¶ added in v1.0.74
func (vector Float32Vector) Float32() Float32Vector
func (Float32Vector) Float64 ¶ added in v1.0.74
func (vector Float32Vector) Float64() Float64Vector
func (Float32Vector) IsNil ¶ added in v1.0.74
func (vector Float32Vector) IsNil() bool
func (Float32Vector) Len ¶ added in v1.0.74
func (vector Float32Vector) Len() int
func (Float32Vector) Native ¶ added in v1.0.74
func (vector Float32Vector) Native() []float32
type Float32Vectors ¶ added in v1.0.74
type Float32Vectors []Float32Vector
func (Float32Vectors) EnsureDim ¶ added in v1.1.8
func (vectors Float32Vectors) EnsureDim(dim int) Float32Vectors
func (Float32Vectors) FirstOneOrNil ¶ added in v1.0.74
func (vectors Float32Vectors) FirstOneOrNil() Float32Vector
func (Float32Vectors) Float32 ¶ added in v1.0.74
func (vectors Float32Vectors) Float32() Float32Vectors
func (Float32Vectors) Float64 ¶ added in v1.0.74
func (vectors Float32Vectors) Float64() Float64Vectors
func (Float32Vectors) Len ¶ added in v1.0.74
func (vectors Float32Vectors) Len() int
func (Float32Vectors) Native ¶ added in v1.0.75
func (vectors Float32Vectors) Native() [][]float32
func (Float32Vectors) PurgeEmpty ¶ added in v1.0.74
func (vectors Float32Vectors) PurgeEmpty() Float32Vectors
func (Float32Vectors) PurgeNil ¶ added in v1.0.74
func (vectors Float32Vectors) PurgeNil() Float32Vectors
type Float64Vector ¶ added in v1.0.74
type Float64Vector []float64
func (Float64Vector) Dim ¶ added in v1.0.74
func (vector Float64Vector) Dim() int
func (Float64Vector) Empty ¶ added in v1.0.74
func (vector Float64Vector) Empty() bool
func (Float64Vector) EnsureDim ¶ added in v1.1.8
func (vector Float64Vector) EnsureDim(dim int) Float64Vector
func (Float64Vector) Float32 ¶ added in v1.0.74
func (vector Float64Vector) Float32() Float32Vector
func (Float64Vector) Float64 ¶ added in v1.0.74
func (vector Float64Vector) Float64() Float64Vector
func (Float64Vector) IsNil ¶ added in v1.0.74
func (vector Float64Vector) IsNil() bool
func (Float64Vector) Len ¶ added in v1.0.74
func (vector Float64Vector) Len() int
func (Float64Vector) Native ¶ added in v1.0.74
func (vector Float64Vector) Native() []float64
type Float64Vectors ¶ added in v1.0.74
type Float64Vectors []Float64Vector
func (Float64Vectors) EnsureDim ¶ added in v1.1.8
func (vectors Float64Vectors) EnsureDim(dim int) Float64Vectors
func (Float64Vectors) FirstOneOrNil ¶ added in v1.0.74
func (vectors Float64Vectors) FirstOneOrNil() Float64Vector
func (Float64Vectors) Float32 ¶ added in v1.0.74
func (vectors Float64Vectors) Float32() Float32Vectors
func (Float64Vectors) Float64 ¶ added in v1.0.74
func (vectors Float64Vectors) Float64() Float64Vectors
func (Float64Vectors) Len ¶ added in v1.0.74
func (vectors Float64Vectors) Len() int
func (Float64Vectors) Native ¶ added in v1.0.75
func (vectors Float64Vectors) Native() [][]float64
func (Float64Vectors) PurgeEmpty ¶ added in v1.0.74
func (vectors Float64Vectors) PurgeEmpty() Float64Vectors
func (Float64Vectors) PurgeNil ¶ added in v1.0.74
func (vectors Float64Vectors) PurgeNil() Float64Vectors
type FloatVector ¶ added in v1.0.74
type FloatVector = Float32Vector
type FloatVectors ¶ added in v1.0.74
type FloatVectors = Float64Vectors
type JsonMap ¶ added in v1.1.9
type JsonMap = JsonObject
type JsonObject ¶ added in v1.1.9
type KeyStringPair ¶ added in v1.0.87
type KeyStringPair[Key any] stl.KeyValuePair[Key, Strings]
type KeyStringsPairs ¶ added in v1.0.87
type KeyStringsPairs[Key any] stl.KeyValuePairs[Key, Strings]
func (KeyStringsPairs[Key]) Native ¶ added in v1.0.87
func (pairs KeyStringsPairs[Key]) Native() stl.KeyValuePairs[Key, Strings]
func (KeyStringsPairs[Key]) SortByValueLen ¶ added in v1.0.87
func (pairs KeyStringsPairs[Key]) SortByValueLen() KeyStringsPairs[Key]
func (KeyStringsPairs[Key]) SortByValueLenDesc ¶ added in v1.0.87
func (pairs KeyStringsPairs[Key]) SortByValueLenDesc() KeyStringsPairs[Key]
type Number ¶ added in v1.0.65
type Number interface {
constraints.Integer | constraints.Float
}
type Pagination ¶ added in v1.1.9
type Pagination struct {
PageSize int64 `json:"PageSize"`
Pages int64 `json:"Pages"`
Items int64 `json:"Items"`
PageNo int64 `json:"PageNo"`
}
func NewPagination ¶ added in v1.1.9
func NewPagination(pageSize, pageNo int64) *Pagination
func NewPaginationFromTotalNext ¶ added in v1.1.9
func NewPaginationFromTotalNext(total, next, pageSize int64) *Pagination
func NewSinglePagination ¶ added in v1.1.9
func NewSinglePagination(n int64) *Pagination
func (*Pagination) Dup ¶ added in v1.1.9
func (pagination *Pagination) Dup() *Pagination
func (*Pagination) GetLimit ¶ added in v1.1.9
func (pagination *Pagination) GetLimit() int64
func (*Pagination) GetSkip ¶ added in v1.1.9
func (pagination *Pagination) GetSkip() int64
func (*Pagination) ItemsUpToCurrentPage ¶ added in v1.1.9
func (pagination *Pagination) ItemsUpToCurrentPage() int64
func (*Pagination) WithDefault ¶ added in v1.1.9
func (pagination *Pagination) WithDefault() *Pagination
func (*Pagination) WithItems ¶ added in v1.1.9
func (pagination *Pagination) WithItems(items int64) *Pagination
type ResponseResult ¶ added in v1.1.9
type ResponseResult = TypedResponseResult[any]
type SequenceNumber ¶ added in v1.0.65
type SequenceNumber = ArithmeticProgression[int]
func NewSequenceNumber ¶ added in v1.0.65
func NewSequenceNumber() *SequenceNumber
func NewSequenceNumberPro ¶ added in v1.0.65
func NewSequenceNumberPro(start, delta int) *SequenceNumber
type SmartJsonMap ¶ added in v1.1.9
type SmartJsonMap JsonMap
func NewSmartJsonMap ¶ added in v1.1.9
func NewSmartJsonMap() SmartJsonMap
func (SmartJsonMap) BatchMerge ¶ added in v1.1.9
func (m SmartJsonMap) BatchMerge(others ...SmartJsonMap) SmartJsonMap
func (SmartJsonMap) Contains ¶ added in v1.1.9
func (m SmartJsonMap) Contains(key string) (ok bool)
func (SmartJsonMap) Dup ¶ added in v1.1.9
func (m SmartJsonMap) Dup() SmartJsonMap
func (SmartJsonMap) Empty ¶ added in v1.1.9
func (m SmartJsonMap) Empty() bool
func (SmartJsonMap) Keys ¶ added in v1.1.9
func (m SmartJsonMap) Keys() Strings
func (SmartJsonMap) Len ¶ added in v1.1.9
func (m SmartJsonMap) Len() int
func (SmartJsonMap) Merge ¶ added in v1.1.9
func (m SmartJsonMap) Merge(other SmartJsonMap) SmartJsonMap
func (SmartJsonMap) Self ¶ added in v1.1.9
func (m SmartJsonMap) Self() SmartJsonMap
func (SmartJsonMap) ValuesByKeys ¶ added in v1.1.9
func (m SmartJsonMap) ValuesByKeys(keys []string) []JsonAny
func (SmartJsonMap) With ¶ added in v1.1.9
func (m SmartJsonMap) With(key string, value any) SmartJsonMap
type SmartJsonMaps ¶ added in v1.1.9
type SmartJsonMaps = []SmartJsonMap
type String ¶ added in v1.0.81
type String string
func (String) IsPrefixOf ¶ added in v1.0.81
func (String) IsSuffixOf ¶ added in v1.0.81
type StringSlice ¶
type StringSlice = []string
type Strings ¶
type Strings []string
func NewStrings ¶
func NewStringsFromSet ¶
func NewStringsFromStringSlice ¶
func NewStringsFromStringSlice(strs StringSlice) Strings
func SplitToStrings ¶ added in v1.0.49
func (Strings) AnyHasPrefix ¶ added in v1.0.81
func (Strings) AnyHasSuffix ¶ added in v1.0.81
func (Strings) EnsureNotNil ¶
func (Strings) FirstOneOrZero ¶ added in v1.0.49
func (Strings) InplaceShuffle ¶ added in v1.0.90
func (Strings) InplaceShufflePro ¶ added in v1.0.90
func (Strings) InplaceSort ¶
func (Strings) ItemsUnique ¶ added in v1.0.53
func (Strings) JoinByComma ¶
func (Strings) JoinByEmptyLine ¶ added in v1.0.76
func (Strings) JoinByMarkdownSplitLine ¶ added in v1.0.76
func (Strings) JoinByNewLine ¶ added in v1.0.76
func (Strings) LastOneOrZero ¶ added in v1.1.8
func (Strings) MapWithSprintf ¶ added in v1.0.49
func (Strings) Native ¶
func (strs Strings) Native() StringSlice
func (Strings) PurgeStringSet ¶ added in v1.1.8
func (Strings) PurgeStrings ¶ added in v1.1.8
func (Strings) RandomOneOrZero ¶ added in v1.0.90
func (Strings) RandomOneOrZeroPro ¶ added in v1.0.90
func (Strings) ReverseDup ¶ added in v1.0.61
func (Strings) ReverseInplace ¶ added in v1.0.61
func (Strings) SliceOfAny ¶ added in v1.0.88
func (Strings) StableUniqueBySet ¶ added in v1.1.8
func (Strings) TrimPrefix ¶ added in v1.0.94
func (Strings) TrimSuffix ¶ added in v1.0.94
func (Strings) UniqueByInplaceSort ¶ added in v1.0.53
func (Strings) UniqueBySet ¶ added in v1.0.53
func (Strings) UniqueBySort ¶ added in v1.0.53
func (Strings) UniqueSorteds ¶
type StringsMapping ¶ added in v1.0.87
type StringsMapping[Key comparable] stl.Mapping[Key, Strings]
func (StringsMapping[Key]) KeyPairs ¶ added in v1.0.87
func (mapping StringsMapping[Key]) KeyPairs() stl.KeyValuePairs[Key, Strings]
type StringsMappingByString ¶ added in v1.0.87
func (StringsMappingByString) KeyValuePairs ¶ added in v1.0.87
func (mapping StringsMappingByString) KeyValuePairs() KeyStringsPairs[string]
type TypedResponseResult ¶ added in v1.1.9
type TypedResponseResult[T any] struct { Success bool `json:"Success"` Code int `json:"Code"` Error string `json:"Error"` Message string `json:"Message"` Pagination *Pagination `json:"Pagination,omitempty"` Data T `json:"Data"` Version string `json:"Version,omitempty"` }
func NewBlankTypedResponseResult ¶ added in v1.1.9
func NewBlankTypedResponseResult[T any]() *TypedResponseResult[T]
func NewTypedResponseResult ¶ added in v1.1.9
func NewTypedResponseResult[T any]( success bool, code int, err string, message string, data T, pagination *Pagination, version string, ) *TypedResponseResult[T]
func NewTypedResponseResultFromData ¶ added in v1.1.9
func NewTypedResponseResultFromData[T any](data T) *TypedResponseResult[T]
func NewTypedResponseResultFromError ¶ added in v1.1.9
func NewTypedResponseResultFromError[T any](code int, err error, msg string) *TypedResponseResult[T]
func NewTypedResponseResultFromPagedData ¶ added in v1.1.9
func NewTypedResponseResultFromPagedData[T any](datas T, pagination *Pagination) *TypedResponseResult[T]
func NewTypedResponseResultFromPagedDatas ¶ added in v1.1.9
func NewTypedResponseResultFromPagedDatas[Datas ~[]Data, Data any](datas Datas, pagination *Pagination) *TypedResponseResult[Datas]
func (*TypedResponseResult[T]) Dup ¶ added in v1.1.9
func (result *TypedResponseResult[T]) Dup() *TypedResponseResult[T]
func (*TypedResponseResult[T]) GetData ¶ added in v1.1.9
func (result *TypedResponseResult[T]) GetData() (t T)
func (*TypedResponseResult[T]) GetError ¶ added in v1.1.9
func (result *TypedResponseResult[T]) GetError() error
func (*TypedResponseResult[T]) ServeHTTP ¶ added in v1.1.9
func (result *TypedResponseResult[T]) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*TypedResponseResult[T]) SetCode ¶ added in v1.1.9
func (result *TypedResponseResult[T]) SetCode(code int)
func (*TypedResponseResult[T]) SetData ¶ added in v1.1.9
func (result *TypedResponseResult[T]) SetData(data T)
func (*TypedResponseResult[T]) SetError ¶ added in v1.1.9
func (result *TypedResponseResult[T]) SetError(err string)
func (*TypedResponseResult[T]) SetMessage ¶ added in v1.1.9
func (result *TypedResponseResult[T]) SetMessage(msg string)
func (*TypedResponseResult[T]) SetSuccess ¶ added in v1.1.9
func (result *TypedResponseResult[T]) SetSuccess(success bool)
func (TypedResponseResult[T]) SwaggerDoc ¶ added in v1.1.9
func (result TypedResponseResult[T]) SwaggerDoc() map[string]string
func (*TypedResponseResult[T]) TemplateFuncs ¶ added in v1.1.9
func (result *TypedResponseResult[T]) TemplateFuncs() template.FuncMap
func (*TypedResponseResult[T]) TemplateWithFuncs ¶ added in v1.1.9
func (result *TypedResponseResult[T]) TemplateWithFuncs() template.FuncMap
func (*TypedResponseResult[T]) TemplateWithSetFuncs ¶ added in v1.1.9
func (result *TypedResponseResult[T]) TemplateWithSetFuncs() template.FuncMap
func (*TypedResponseResult[T]) WithCode ¶ added in v1.1.9
func (result *TypedResponseResult[T]) WithCode(code int) *TypedResponseResult[T]
func (*TypedResponseResult[T]) WithData ¶ added in v1.1.9
func (result *TypedResponseResult[T]) WithData(data T) *TypedResponseResult[T]
func (*TypedResponseResult[T]) WithError ¶ added in v1.1.9
func (result *TypedResponseResult[T]) WithError(err string) *TypedResponseResult[T]
func (*TypedResponseResult[T]) WithFail ¶ added in v1.1.22
func (result *TypedResponseResult[T]) WithFail(code int, err, msg string) *TypedResponseResult[T]
func (*TypedResponseResult[T]) WithMessage ¶ added in v1.1.9
func (result *TypedResponseResult[T]) WithMessage(msg string) *TypedResponseResult[T]
func (*TypedResponseResult[T]) WithSuccess ¶ added in v1.1.9
func (result *TypedResponseResult[T]) WithSuccess(success bool) *TypedResponseResult[T]
func (*TypedResponseResult[T]) WithSuccessData ¶ added in v1.1.22
func (result *TypedResponseResult[T]) WithSuccessData(data T) *TypedResponseResult[T]
func (*TypedResponseResult[T]) WithSuccessPagedData ¶ added in v1.1.22
func (result *TypedResponseResult[T]) WithSuccessPagedData(data T, pagination *Pagination) *TypedResponseResult[T]
func (*TypedResponseResult[T]) WriteHttpResponse ¶ added in v1.1.9
func (result *TypedResponseResult[T]) WriteHttpResponse(w http.ResponseWriter) error
func (*TypedResponseResult[T]) WriteHttpResponseWithStatus ¶ added in v1.1.9
func (result *TypedResponseResult[T]) WriteHttpResponseWithStatus(w http.ResponseWriter, statusCode int) error
Click to show internal directories.
Click to hide internal directories.