core

package
v0.0.0-...-2575faf Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package core for core functions

Index

Constants

View Source
const (
	UnknownText = "unknown"
)

Variables

View Source
var (
	// 1xx
	ErrCodeGeneric error = &Error{codeGeneric}
	// 4xx
	ErrCodeUnsupportedFeature error = &Error{codeUnsupportedFeature}
	ErrCodeBadSyntax          error = &Error{codeBadSyntax}
	// 5xx
	ErrCodeDataMarshaling       error = &Error{codeDataMarshaling}
	ErrCodeDataUnmarshaling     error = &Error{codeDataUnmarshaling}
	ErrCodeJSONSchemaValidation error = &Error{codeJSONSchemaValidation}
	ErrCodeUnsupportedDataType  error = &Error{codeUnsupportedDataType}
	ErrCodeInvalidDataType      error = &Error{codeInvalidDataType}
	ErrCodeUnsupportedVersion   error = &Error{codeUnsupportedVersion}
)

Functions

func Stringify

func Stringify(obj any, exclude []string) (string, error)

Types

type Error

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

func (*Error) Error

func (e *Error) Error() string

func (*Error) GetCode

func (e *Error) GetCode() int

func (*Error) GetMessage

func (e *Error) GetMessage() string

func (*Error) Is

func (e *Error) Is(tgt error) bool

type WildcardString

type WildcardString string

func (WildcardString) WildcardEqual

func (a WildcardString) WildcardEqual(value string) bool

func (WildcardString) WildcardInclude

func (a WildcardString) WildcardInclude(value string) bool

func (WildcardString) WildcardMatch

func (a WildcardString) WildcardMatch(value string, sanitized bool) bool

Jump to

Keyboard shortcuts

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