coreonce

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyOnce

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

func NewAnyOnce

func NewAnyOnce(initializerFunc func() interface{}) AnyOnce

func NewAnyOncePtr

func NewAnyOncePtr(initializerFunc func() interface{}) *AnyOnce

func (*AnyOnce) IsNull

func (it *AnyOnce) IsNull() bool

func (*AnyOnce) IsStringEmpty

func (it *AnyOnce) IsStringEmpty() bool

func (*AnyOnce) IsStringEmptyOrWhitespace

func (it *AnyOnce) IsStringEmptyOrWhitespace() bool

func (*AnyOnce) Serialize added in v1.2.16

func (it *AnyOnce) Serialize() ([]byte, error)

func (*AnyOnce) String

func (it *AnyOnce) String() string

func (*AnyOnce) Value

func (it *AnyOnce) Value() interface{}

type BoolOnce

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

func NewBoolOnce

func NewBoolOnce(initializerFunc func() bool) BoolOnce

func NewBoolOncePtr

func NewBoolOncePtr(initializerFunc func() bool) *BoolOnce

func (*BoolOnce) MarshalJSON

func (it *BoolOnce) MarshalJSON() ([]byte, error)

func (*BoolOnce) Serialize added in v1.2.16

func (it *BoolOnce) Serialize() ([]byte, error)

func (*BoolOnce) String

func (it *BoolOnce) String() string

func (*BoolOnce) UnmarshalJSON

func (it *BoolOnce) UnmarshalJSON(data []byte) error

func (*BoolOnce) Value

func (it *BoolOnce) Value() bool

type ByteOnce

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

func NewByteOnce

func NewByteOnce(initializerFunc func() byte) ByteOnce

func NewByteOncePtr

func NewByteOncePtr(initializerFunc func() byte) *ByteOnce

func (*ByteOnce) Int

func (it *ByteOnce) Int() int

func (*ByteOnce) IsEmpty

func (it *ByteOnce) IsEmpty() bool

IsEmpty returns true if zero

func (*ByteOnce) IsNegative

func (it *ByteOnce) IsNegative() bool

func (*ByteOnce) IsPositive

func (it *ByteOnce) IsPositive() bool

func (*ByteOnce) IsZero

func (it *ByteOnce) IsZero() bool

func (*ByteOnce) MarshalJSON

func (it *ByteOnce) MarshalJSON() ([]byte, error)

func (*ByteOnce) Serialize added in v1.2.16

func (it *ByteOnce) Serialize() ([]byte, error)

func (*ByteOnce) String

func (it *ByteOnce) String() string

func (*ByteOnce) UnmarshalJSON

func (it *ByteOnce) UnmarshalJSON(data []byte) error

func (*ByteOnce) Value

func (it *ByteOnce) Value() byte

type BytesOnce added in v1.2.16

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

func NewBytesOnce added in v1.2.16

func NewBytesOnce(initializerFunc func() []byte) BytesOnce

func NewBytesOncePtr added in v1.2.16

func NewBytesOncePtr(initializerFunc func() []byte) *BytesOnce

func (*BytesOnce) IsEmpty added in v1.2.16

func (it *BytesOnce) IsEmpty() bool

IsEmpty returns true if zero

func (*BytesOnce) Length added in v1.2.16

func (it *BytesOnce) Length() int

func (*BytesOnce) MarshalJSON added in v1.2.16

func (it *BytesOnce) MarshalJSON() ([]byte, error)

func (*BytesOnce) Serialize added in v1.2.16

func (it *BytesOnce) Serialize() ([]byte, error)

func (*BytesOnce) String added in v1.2.16

func (it *BytesOnce) String() string

func (*BytesOnce) UnmarshalJSON added in v1.2.16

func (it *BytesOnce) UnmarshalJSON(data []byte) error

func (*BytesOnce) Value added in v1.2.16

func (it *BytesOnce) Value() []byte

type ErrorOnce

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

func NewErrorOnce

func NewErrorOnce(initializerFunc func() error) ErrorOnce

func NewErrorOncePtr

func NewErrorOncePtr(initializerFunc func() error) *ErrorOnce

func (*ErrorOnce) ConcatNew

func (it *ErrorOnce) ConcatNew(messages ...string) error

func (*ErrorOnce) ConcatNewString

func (it *ErrorOnce) ConcatNewString(messages ...string) string

func (*ErrorOnce) HandleError

func (it *ErrorOnce) HandleError()

HandleError with panic if error exist or else skip

Skip if no error type (NoError).

func (*ErrorOnce) HandleErrorWith

func (it *ErrorOnce) HandleErrorWith(messages ...string)

HandleErrorWith by concatenating message and then panic if error exist or else skip

Skip if no error type (NoError).

func (*ErrorOnce) HasError

func (it *ErrorOnce) HasError() bool

func (*ErrorOnce) IsMessageEqual

func (it *ErrorOnce) IsMessageEqual(msg string) bool

func (*ErrorOnce) IsNull

func (it *ErrorOnce) IsNull() bool

func (*ErrorOnce) IsNullOrEmpty

func (it *ErrorOnce) IsNullOrEmpty() bool

func (*ErrorOnce) MarshalJSON

func (it *ErrorOnce) MarshalJSON() ([]byte, error)

func (*ErrorOnce) Message

func (it *ErrorOnce) Message() string

func (*ErrorOnce) Serialize added in v1.2.16

func (it *ErrorOnce) Serialize() ([]byte, error)

func (*ErrorOnce) String

func (it *ErrorOnce) String() string

func (*ErrorOnce) UnmarshalJSON

func (it *ErrorOnce) UnmarshalJSON(data []byte) error

func (*ErrorOnce) Value

func (it *ErrorOnce) Value() error

type IntegerOnce

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

func NewIntegerOnce

func NewIntegerOnce(initializerFunc func() int) IntegerOnce

func NewIntegerOncePtr

func NewIntegerOncePtr(initializerFunc func() int) *IntegerOnce

func (*IntegerOnce) IsEmpty

func (it *IntegerOnce) IsEmpty() bool

IsEmpty returns true if zero

func (*IntegerOnce) IsNegative

func (it *IntegerOnce) IsNegative() bool

func (*IntegerOnce) IsPositive

func (it *IntegerOnce) IsPositive() bool

func (*IntegerOnce) IsZero

func (it *IntegerOnce) IsZero() bool

func (*IntegerOnce) MarshalJSON

func (it *IntegerOnce) MarshalJSON() ([]byte, error)

func (*IntegerOnce) Serialize added in v1.2.16

func (it *IntegerOnce) Serialize() ([]byte, error)

func (*IntegerOnce) String

func (it *IntegerOnce) String() string

func (*IntegerOnce) UnmarshalJSON

func (it *IntegerOnce) UnmarshalJSON(data []byte) error

func (*IntegerOnce) Value

func (it *IntegerOnce) Value() int

type IntegersOnce added in v1.2.16

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

func NewIntegersOnce added in v1.2.16

func NewIntegersOnce(initializerFunc func() []int) IntegersOnce

func NewIntegersOncePtr added in v1.2.16

func NewIntegersOncePtr(initializerFunc func() []int) *IntegersOnce

func (*IntegersOnce) Integers added in v1.2.16

func (it *IntegersOnce) Integers() []int

func (*IntegersOnce) IsEmpty added in v1.2.16

func (it *IntegersOnce) IsEmpty() bool

IsEmpty returns true if zero

func (*IntegersOnce) IsEqual added in v1.2.16

func (it *IntegersOnce) IsEqual(integerItems ...int) bool

func (*IntegersOnce) IsZero added in v1.2.16

func (it *IntegersOnce) IsZero() bool

func (*IntegersOnce) List added in v1.2.16

func (it *IntegersOnce) List() []int

func (*IntegersOnce) MarshalJSON added in v1.2.16

func (it *IntegersOnce) MarshalJSON() ([]byte, error)

func (*IntegersOnce) RangesBoolMap added in v1.2.16

func (it *IntegersOnce) RangesBoolMap() map[int]bool

func (*IntegersOnce) RangesMap added in v1.2.16

func (it *IntegersOnce) RangesMap() map[int]int

func (*IntegersOnce) Serialize added in v1.2.16

func (it *IntegersOnce) Serialize() ([]byte, error)

func (*IntegersOnce) Slice added in v1.2.16

func (it *IntegersOnce) Slice() []int

func (*IntegersOnce) Sorted added in v1.2.16

func (it *IntegersOnce) Sorted() []int

Sorted

Warning : Current values will be mutated,
so better to make a clone of it.

func (*IntegersOnce) String added in v1.2.16

func (it *IntegersOnce) String() string

func (*IntegersOnce) UnmarshalJSON added in v1.2.16

func (it *IntegersOnce) UnmarshalJSON(data []byte) error

func (*IntegersOnce) Value added in v1.2.16

func (it *IntegersOnce) Value() []int

func (*IntegersOnce) Values added in v1.2.16

func (it *IntegersOnce) Values() []int

type StringOnce

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

func NewStringOnce

func NewStringOnce(initializerFunc func() string) StringOnce

func NewStringOncePtr

func NewStringOncePtr(initializerFunc func() string) *StringOnce

func (*StringOnce) Bytes

func (it *StringOnce) Bytes() []byte

func (*StringOnce) Error

func (it *StringOnce) Error() error

func (*StringOnce) IsContains

func (it *StringOnce) IsContains(equalString string) bool

func (*StringOnce) IsEmpty

func (it *StringOnce) IsEmpty() bool

func (*StringOnce) IsEmptyOrWhitespace

func (it *StringOnce) IsEmptyOrWhitespace() bool

func (*StringOnce) IsEqual

func (it *StringOnce) IsEqual(equalString string) bool

func (*StringOnce) MarshalJSON

func (it *StringOnce) MarshalJSON() ([]byte, error)

func (*StringOnce) Serialize added in v1.2.16

func (it *StringOnce) Serialize() ([]byte, error)

func (*StringOnce) String

func (it *StringOnce) String() string

func (*StringOnce) UnmarshalJSON

func (it *StringOnce) UnmarshalJSON(data []byte) error

func (*StringOnce) Value

func (it *StringOnce) Value() string

func (*StringOnce) ValuePtr

func (it *StringOnce) ValuePtr() *string

type StringsOnce

type StringsOnce struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewStringsOnce

func NewStringsOnce(initializerFunc func() []string) StringsOnce

func NewStringsOncePtr

func NewStringsOncePtr(initializerFunc func() []string) *StringsOnce

func (*StringsOnce) Csv

func (it *StringsOnce) Csv() string

func (*StringsOnce) CsvLines

func (it *StringsOnce) CsvLines() []string

func (*StringsOnce) CsvOptions

func (it *StringsOnce) CsvOptions() string

func (*StringsOnce) Has

func (it *StringsOnce) Has(search string) bool

func (*StringsOnce) HasAll

func (it *StringsOnce) HasAll(searchTerms ...string) bool

func (*StringsOnce) HasAnyItem

func (it *StringsOnce) HasAnyItem() bool

func (*StringsOnce) IsContains

func (it *StringsOnce) IsContains(search string) bool

func (*StringsOnce) IsEmpty

func (it *StringsOnce) IsEmpty() bool

IsEmpty returns true if zero

func (*StringsOnce) IsEqual added in v1.2.16

func (it *StringsOnce) IsEqual(comparingItems ...string) bool

func (StringsOnce) JsonStringMust added in v0.8.3

func (it StringsOnce) JsonStringMust() string

func (*StringsOnce) Length

func (it *StringsOnce) Length() int

func (*StringsOnce) List added in v1.0.8

func (it *StringsOnce) List() []string

func (*StringsOnce) MarshalJSON

func (it *StringsOnce) MarshalJSON() ([]byte, error)

func (*StringsOnce) RangesMap added in v1.2.16

func (it *StringsOnce) RangesMap() map[string]int

func (*StringsOnce) SafeStrings added in v1.0.8

func (it *StringsOnce) SafeStrings() []string

func (StringsOnce) Serialize added in v1.2.16

func (it StringsOnce) Serialize() ([]byte, error)

func (*StringsOnce) Sorted added in v1.2.16

func (it *StringsOnce) Sorted() []string

Sorted

Warning : Current values will be mutated,
so better to make a clone of it.

func (StringsOnce) String

func (it StringsOnce) String() string

func (*StringsOnce) Strings

func (it *StringsOnce) Strings() []string

func (*StringsOnce) UniqueMap

func (it *StringsOnce) UniqueMap() map[string]bool

func (*StringsOnce) UniqueMapLock

func (it *StringsOnce) UniqueMapLock() map[string]bool

func (*StringsOnce) UnmarshalJSON

func (it *StringsOnce) UnmarshalJSON(data []byte) error

func (*StringsOnce) Value

func (it *StringsOnce) Value() []string

func (*StringsOnce) Values

func (it *StringsOnce) Values() []string

func (*StringsOnce) ValuesPtr added in v1.2.16

func (it *StringsOnce) ValuesPtr() *[]string

Jump to

Keyboard shortcuts

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