entity

package
v0.0.0-...-b3eaea6 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const SuccessResponseMessage = "success"

Variables

View Source
var ErrInvalidHashType = errors.New("not a valid HashType")

Functions

This section is empty.

Types

type HashRequestItem

type HashRequestItem struct {
	ID   string
	Type HashType
	Data string
}

type HashResponseItem

type HashResponseItem struct {
	ID     string
	Result string
}

type HashType

type HashType string

HashType ENUM(SHA256, SHA512)

const (
	// HashTypeSHA256 is a HashType of type SHA256.
	HashTypeSHA256 HashType = "SHA256"
	// HashTypeSHA512 is a HashType of type SHA512.
	HashTypeSHA512 HashType = "SHA512"
)

func ParseHashType

func ParseHashType(name string) (HashType, error)

ParseHashType attempts to convert a string to a HashType.

func (HashType) IsValid

func (x HashType) IsValid() bool

String implements the Stringer interface.

func (HashType) MarshalText

func (x HashType) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method.

func (HashType) String

func (x HashType) String() string

String implements the Stringer interface.

func (*HashType) UnmarshalText

func (x *HashType) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method.

Jump to

Keyboard shortcuts

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