Documentation
¶
Index ¶
- Variables
- type JsonContractsBinder
- type JsonMarshaller
- type JsonParseSelfInjector
- type Jsoner
- type Result
- func EmptyWithError(err error) Result
- func EmptyWithErrorPtr(err error) *Result
- func EmptyWithoutErrorPtr() *Result
- func New(jsonBytes []byte, err error) Result
- func NewFromAny(any interface{}) *Result
- func NewFromModel(model *ResultModel) *Result
- func NewPtr(jsonBytes []byte, err error) *Result
- func NewPtrUsingBytesPtr(jsonBytes *[]byte, err error) *Result
- func NewUsingBytes(jsonBytes *[]byte) Result
- func NewUsingBytesError(bytesError *coredata.BytesError) Result
- func NewUsingBytesPtr(jsonBytes *[]byte) *Result
- func (jsonResult *Result) AsJsonMarshaller() JsonMarshaller
- func (jsonResult *Result) AsJsonParseSelfInjector() JsonParseSelfInjector
- func (jsonResult *Result) AsJsoner() Jsoner
- func (jsonResult *Result) HandleError()
- func (jsonResult *Result) HandleErrorWithMsg(msg string)
- func (jsonResult *Result) HasBytes() bool
- func (jsonResult *Result) HasError() bool
- func (jsonResult *Result) HasJson() bool
- func (jsonResult *Result) InjectInto(injector JsonParseSelfInjector) error
- func (jsonResult *Result) IsEmptyError() bool
- func (jsonResult *Result) IsEmptyJson() bool
- func (jsonResult *Result) IsEmptyJsonBytes() bool
- func (jsonResult *Result) Json() *Result
- func (jsonResult *Result) JsonModel() *ResultModel
- func (jsonResult *Result) JsonModelAny() interface{}
- func (jsonResult *Result) JsonParseSelfInject(jsonResultIn *Result) error
- func (jsonResult *Result) JsonString() string
- func (jsonResult *Result) JsonStringPtr() *string
- func (jsonResult *Result) MarshalJSON() ([]byte, error)
- func (jsonResult *Result) MeaningfulError() error
- func (jsonResult *Result) ParseInjectUsingJson(jsonResultIn *Result) (*Result, error)
- func (jsonResult *Result) ParseInjectUsingJsonMust(jsonResultIn *Result) *Result
- func (jsonResult *Result) Unmarshal(any interface{}) error
- func (jsonResult *Result) UnmarshalJSON(data []byte) error
- type ResultModel
- type ResultsCollection
- func EmptyResultsCollection() *ResultsCollection
- func NewResultsCollection(cap int) *ResultsCollection
- func NewResultsCollectionUsingAnys(addCapacity int, anys ...interface{}) *ResultsCollection
- func NewResultsCollectionUsingJsonResults(addCapacity int, results ...*Result) *ResultsCollection
- func NewResultsCollectionUsingJsoners(addCapacity int, jsoners ...Jsoner) *ResultsCollection
- func (receiver *ResultsCollection) Add(result *Result) *ResultsCollection
- func (receiver *ResultsCollection) AddJsoner(jsoners ...Jsoner) *ResultsCollection
- func (receiver *ResultsCollection) AddJsonerPtr(jsoners *[]Jsoner) *ResultsCollection
- func (receiver *ResultsCollection) AddNonNilItems(results ...*Result) *ResultsCollection
- func (receiver *ResultsCollection) AddNonNilItemsPtr(results *[]*Result) *ResultsCollection
- func (receiver *ResultsCollection) AddResultsCollection(collection *ResultsCollection) *ResultsCollection
- func (receiver *ResultsCollection) AddSkipOnNil(result *Result) *ResultsCollection
- func (receiver *ResultsCollection) Adds(results ...*Result) *ResultsCollection
- func (receiver *ResultsCollection) AddsAnys(anys ...interface{}) *ResultsCollection
- func (receiver *ResultsCollection) AddsAnysPtr(anysPtr *[]interface{}) *ResultsCollection
- func (receiver *ResultsCollection) AllErrors() (errListPtr *[]error, hasAnyError bool)
- func (receiver *ResultsCollection) AsJsonParseSelfInjector() JsonParseSelfInjector
- func (receiver *ResultsCollection) AsJsoner() Jsoner
- func (receiver *ResultsCollection) Clear() *ResultsCollection
- func (receiver *ResultsCollection) GetAt(index int) *Result
- func (receiver *ResultsCollection) GetAtSafe(index int) *Result
- func (receiver *ResultsCollection) GetAtSafeUsingLength(index, length int) *Result
- func (receiver *ResultsCollection) GetErrorsAsSingle() error
- func (receiver *ResultsCollection) GetErrorsAsSingleString() string
- func (receiver *ResultsCollection) GetErrorsStrings() *[]string
- func (receiver *ResultsCollection) GetStrings() *[]string
- func (receiver *ResultsCollection) HasError() bool
- func (receiver *ResultsCollection) HasItems() bool
- func (receiver *ResultsCollection) InjectIntoAt(index int, injector JsonParseSelfInjector) error
- func (receiver *ResultsCollection) InjectIntoSameIndex(injectors ...JsonParseSelfInjector) (errListPtr *[]error, hasAnyError bool)
- func (receiver *ResultsCollection) IsEmpty() bool
- func (receiver *ResultsCollection) Json() *Result
- func (receiver *ResultsCollection) JsonModel() *ResultsCollection
- func (receiver *ResultsCollection) JsonModelAny() interface{}
- func (receiver *ResultsCollection) JsonParseSelfInject(jsonResult *Result) error
- func (receiver *ResultsCollection) Length() int
- func (receiver *ResultsCollection) ParseInjectUsingJson(jsonResult *Result) (*ResultsCollection, error)
- func (receiver *ResultsCollection) ParseInjectUsingJsonMust(jsonResult *Result) *ResultsCollection
- func (receiver *ResultsCollection) UnmarshalAt(index int, any interface{}) error
- func (receiver *ResultsCollection) UnmarshalIntoSameIndex(anys ...interface{}) (errListPtr *[]error, hasAnyError bool)
Constants ¶
This section is empty.
Variables ¶
var ( StaticJsonError = msgtype.EmptyResultCannotMakeJson. Error(constants.EmptyString, constants.EmptyString) )
Functions ¶
This section is empty.
Types ¶
type JsonContractsBinder ¶ added in v0.4.1
type JsonContractsBinder interface { Jsoner JsonMarshaller JsonParseSelfInjector AsJsonContractsBinder() JsonContractsBinder }
type JsonMarshaller ¶
type JsonParseSelfInjector ¶ added in v0.4.0
type Result ¶
func EmptyWithError ¶ added in v0.1.7
func EmptyWithErrorPtr ¶ added in v0.1.7
func EmptyWithoutErrorPtr ¶ added in v0.1.7
func EmptyWithoutErrorPtr() *Result
func NewFromAny ¶ added in v0.3.1
func NewFromAny(any interface{}) *Result
func NewFromModel ¶ added in v0.3.4
func NewFromModel(model *ResultModel) *Result
func NewPtrUsingBytesPtr ¶ added in v0.1.7
func NewUsingBytes ¶ added in v0.1.7
func NewUsingBytesError ¶ added in v0.4.1
func NewUsingBytesError(bytesError *coredata.BytesError) Result
NewUsingBytesError Get created with nil.
func NewUsingBytesPtr ¶ added in v0.1.7
func (*Result) AsJsonMarshaller ¶ added in v0.3.4
func (jsonResult *Result) AsJsonMarshaller() JsonMarshaller
func (*Result) AsJsonParseSelfInjector ¶ added in v0.3.4
func (jsonResult *Result) AsJsonParseSelfInjector() JsonParseSelfInjector
func (*Result) HandleError ¶
func (jsonResult *Result) HandleError()
func (*Result) HandleErrorWithMsg ¶
func (*Result) InjectInto ¶ added in v0.3.4
func (jsonResult *Result) InjectInto( injector JsonParseSelfInjector, ) error
func (*Result) IsEmptyError ¶
func (*Result) IsEmptyJson ¶
func (*Result) IsEmptyJsonBytes ¶
IsEmptyJsonBytes len == 0, nil, {} returns as empty true
func (*Result) JsonModel ¶ added in v0.3.4
func (jsonResult *Result) JsonModel() *ResultModel
func (*Result) JsonModelAny ¶ added in v0.3.4
func (jsonResult *Result) JsonModelAny() interface{}
func (*Result) JsonParseSelfInject ¶ added in v0.3.4
func (*Result) JsonString ¶
func (*Result) JsonStringPtr ¶
func (*Result) MarshalJSON ¶ added in v0.3.4
func (*Result) MeaningfulError ¶ added in v0.4.1
MeaningfulError create error even if results are nil.
func (*Result) ParseInjectUsingJson ¶ added in v0.3.4
ParseInjectUsingJson It will not update the self but creates a new one.
func (*Result) ParseInjectUsingJsonMust ¶ added in v0.3.4
ParseInjectUsingJsonMust Panic if error
func (*Result) UnmarshalJSON ¶ added in v0.3.4
type ResultModel ¶ added in v0.3.4
func NewModel ¶ added in v0.3.4
func NewModel(result *Result) *ResultModel
type ResultsCollection ¶ added in v0.3.4
type ResultsCollection struct {
Items *[]*Result `json:"JsonResultsCollection"`
}
func EmptyResultsCollection ¶ added in v0.3.4
func EmptyResultsCollection() *ResultsCollection
func NewResultsCollection ¶ added in v0.3.4
func NewResultsCollection(cap int) *ResultsCollection
func NewResultsCollectionUsingAnys ¶ added in v0.3.5
func NewResultsCollectionUsingAnys( addCapacity int, anys ...interface{}, ) *ResultsCollection
func NewResultsCollectionUsingJsonResults ¶ added in v0.3.4
func NewResultsCollectionUsingJsonResults( addCapacity int, results ...*Result, ) *ResultsCollection
func NewResultsCollectionUsingJsoners ¶ added in v0.3.4
func NewResultsCollectionUsingJsoners( addCapacity int, jsoners ...Jsoner, ) *ResultsCollection
func (*ResultsCollection) Add ¶ added in v0.3.4
func (receiver *ResultsCollection) Add( result *Result, ) *ResultsCollection
func (*ResultsCollection) AddJsoner ¶ added in v0.3.4
func (receiver *ResultsCollection) AddJsoner( jsoners ...Jsoner, ) *ResultsCollection
AddJsoner skip on nil
func (*ResultsCollection) AddJsonerPtr ¶ added in v0.3.4
func (receiver *ResultsCollection) AddJsonerPtr( jsoners *[]Jsoner, ) *ResultsCollection
AddJsonerPtr skip on nil
func (*ResultsCollection) AddNonNilItems ¶ added in v0.3.4
func (receiver *ResultsCollection) AddNonNilItems( results ...*Result, ) *ResultsCollection
AddNonNilItems skip on nil
func (*ResultsCollection) AddNonNilItemsPtr ¶ added in v0.3.4
func (receiver *ResultsCollection) AddNonNilItemsPtr( results *[]*Result, ) *ResultsCollection
AddNonNilItemsPtr skip on nil
func (*ResultsCollection) AddResultsCollection ¶ added in v0.3.4
func (receiver *ResultsCollection) AddResultsCollection( collection *ResultsCollection, ) *ResultsCollection
AddResultsCollection skip on nil items
func (*ResultsCollection) AddSkipOnNil ¶ added in v0.3.5
func (receiver *ResultsCollection) AddSkipOnNil( result *Result, ) *ResultsCollection
AddSkipOnNil skip on nil
func (*ResultsCollection) Adds ¶ added in v0.3.4
func (receiver *ResultsCollection) Adds( results ...*Result, ) *ResultsCollection
func (*ResultsCollection) AddsAnys ¶ added in v0.3.5
func (receiver *ResultsCollection) AddsAnys( anys ...interface{}, ) *ResultsCollection
AddsAnys Skip on nil
func (*ResultsCollection) AddsAnysPtr ¶ added in v0.3.5
func (receiver *ResultsCollection) AddsAnysPtr( anysPtr *[]interface{}, ) *ResultsCollection
AddsAnysPtr Skip on nil
func (*ResultsCollection) AllErrors ¶ added in v0.3.4
func (receiver *ResultsCollection) AllErrors() ( errListPtr *[]error, hasAnyError bool, )
func (*ResultsCollection) AsJsonParseSelfInjector ¶ added in v0.3.4
func (receiver *ResultsCollection) AsJsonParseSelfInjector() JsonParseSelfInjector
func (*ResultsCollection) AsJsoner ¶ added in v0.3.4
func (receiver *ResultsCollection) AsJsoner() Jsoner
func (*ResultsCollection) Clear ¶ added in v0.3.4
func (receiver *ResultsCollection) Clear() *ResultsCollection
func (*ResultsCollection) GetAt ¶ added in v0.3.4
func (receiver *ResultsCollection) GetAt( index int, ) *Result
func (*ResultsCollection) GetAtSafe ¶ added in v0.3.4
func (receiver *ResultsCollection) GetAtSafe( index int, ) *Result
func (*ResultsCollection) GetAtSafeUsingLength ¶ added in v0.3.4
func (receiver *ResultsCollection) GetAtSafeUsingLength( index, length int, ) *Result
func (*ResultsCollection) GetErrorsAsSingle ¶ added in v0.3.4
func (receiver *ResultsCollection) GetErrorsAsSingle() error
func (*ResultsCollection) GetErrorsAsSingleString ¶ added in v0.3.4
func (receiver *ResultsCollection) GetErrorsAsSingleString() string
func (*ResultsCollection) GetErrorsStrings ¶ added in v0.3.5
func (receiver *ResultsCollection) GetErrorsStrings() *[]string
func (*ResultsCollection) GetStrings ¶ added in v0.3.4
func (receiver *ResultsCollection) GetStrings() *[]string
func (*ResultsCollection) HasError ¶ added in v0.3.4
func (receiver *ResultsCollection) HasError() bool
HasError has any error
func (*ResultsCollection) HasItems ¶ added in v0.3.4
func (receiver *ResultsCollection) HasItems() bool
func (*ResultsCollection) InjectIntoAt ¶ added in v0.3.4
func (receiver *ResultsCollection) InjectIntoAt( index int, injector JsonParseSelfInjector, ) error
func (*ResultsCollection) InjectIntoSameIndex ¶ added in v0.3.4
func (receiver *ResultsCollection) InjectIntoSameIndex( injectors ...JsonParseSelfInjector, ) ( errListPtr *[]error, hasAnyError bool, )
InjectIntoSameIndex any nil skip
func (*ResultsCollection) IsEmpty ¶ added in v0.3.4
func (receiver *ResultsCollection) IsEmpty() bool
func (*ResultsCollection) Json ¶ added in v0.3.4
func (receiver *ResultsCollection) Json() *Result
func (*ResultsCollection) JsonModel ¶ added in v0.3.4
func (receiver *ResultsCollection) JsonModel() *ResultsCollection
func (*ResultsCollection) JsonModelAny ¶ added in v0.3.4
func (receiver *ResultsCollection) JsonModelAny() interface{}
func (*ResultsCollection) JsonParseSelfInject ¶ added in v0.3.4
func (receiver *ResultsCollection) JsonParseSelfInject( jsonResult *Result, ) error
func (*ResultsCollection) Length ¶ added in v0.3.4
func (receiver *ResultsCollection) Length() int
func (*ResultsCollection) ParseInjectUsingJson ¶ added in v0.3.4
func (receiver *ResultsCollection) ParseInjectUsingJson( jsonResult *Result, ) (*ResultsCollection, error)
ParseInjectUsingJson It will not update the self but creates a new one.
func (*ResultsCollection) ParseInjectUsingJsonMust ¶ added in v0.3.4
func (receiver *ResultsCollection) ParseInjectUsingJsonMust( jsonResult *Result, ) *ResultsCollection
ParseInjectUsingJsonMust Panic if error
func (*ResultsCollection) UnmarshalAt ¶ added in v0.3.4
func (receiver *ResultsCollection) UnmarshalAt( index int, any interface{}, ) error
func (*ResultsCollection) UnmarshalIntoSameIndex ¶ added in v0.3.4
func (receiver *ResultsCollection) UnmarshalIntoSameIndex( anys ...interface{}, ) ( errListPtr *[]error, hasAnyError bool, )
UnmarshalIntoSameIndex any nil skip