Categorygithub.com/domonda/go-types
modulepackage
0.0.0-20250225133122-0516d5b855ff
Repository: https://github.com/domonda/go-types.git
Documentation: pkg.go.dev

# README

go-types

Mainly financial Go types used throughout the Domonda App

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GENERATED.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

CanMarshalJSON returns if a type can be marshalled as JSON.
CombinedValidatErr creates a ValidatErr whose Validate method returns the first error from the passed validatErrs Validate methods or nil if none returned an error.
CombinedValidator creates a Validator whose Valid method returns false if any of the passed validators Valid methods returned false, else it returns true.
DeepValidate validates all fields of a struct, all elements of a slice or array, and all values of a map by recursively calling Validate or Valid methods.
MustLenString returns a LenString or panics on errors from Validate.
NewKeyMutex returns a new KeyMutex.
NewLenString returns a new LenString without validating it.
No description provided by the author
No description provided by the author
No description provided by the author
ReflectCompare compares two reflect.Values of the same type.
No description provided by the author
No description provided by the author
SliceContainsAll returns true if outer contains all elements of inner.
SliceContainsAny returns true if outer contains any element of inner.
TryValidate returns an error and true if v implements ValidatErr or Validator and the methods ValidatErr.Validate() or Validator.Valid() indicate an invalid value.
Validate returns an error if v implements ValidatErr or Validator and the methods ValidatErr.Validate() or Validator.Valid() indicate an invalid value.

# Variables

ErrInvalidValue means that a value is not valid, returned by Validate() and ValidatorAsValidatErr.Validate().

# Structs

KeyMutex manages a unique mutex for every locked key.
LenString holds a string together with a minimum and maximum length.
StaticValidatErr implements the ValidatErr interface for a validation error value.
ValidatorAsValidatErr wraps a Validator as a ValidatErr, returning ErrInvalidValue when Validator.Valid() returns false.

# Interfaces

No description provided by the author
ValidatErr can be implemented by types that can validate their data.
Validator can be implemented by types that can validate their data.

# Type aliases

No description provided by the author
StaticValidator implements the Validator interface a bool validity value.
ValidatErrFunc implements the ValidatErr interface with a function.
No description provided by the author
ValidatorFunc implements the Validator interface with a function.
No description provided by the author