ident

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalBytes

func MarshalBytes(h hash.Hash, v []byte)

func MarshalIdentifiable

func MarshalIdentifiable(h hash.Hash, v Identifiable)

func MarshalInt64

func MarshalInt64(h hash.Hash, v int64)

func MarshalString

func MarshalString(h hash.Hash, v string)

func MarshalStringMap

func MarshalStringMap(h hash.Hash, v map[string]string)

func MarshalStringSlice

func MarshalStringSlice(h hash.Hash, v []string)

Types

type AddressProvider

type AddressProvider interface {
	ContentAddress(entity Identifiable) string
}

type AddressType

type AddressType uint8
const (
	AddressTypeBytes AddressType = iota
	AddressTypeString
	AddressTypeInt64
	AddressTypeStringSlice
	AddressTypeStringMap
	AddressTypeEmbeddedIdentifiable
)

type AddressWriter

type AddressWriter struct {
	hash.Hash
}

func NewAddressWriter

func NewAddressWriter() *AddressWriter

func (*AddressWriter) Identity

func (b *AddressWriter) Identity() []byte

func (*AddressWriter) MarshalBytes

func (b *AddressWriter) MarshalBytes(v []byte) *AddressWriter

func (*AddressWriter) MarshalIdentifiable

func (b *AddressWriter) MarshalIdentifiable(v Identifiable) *AddressWriter

func (*AddressWriter) MarshalInt64

func (b *AddressWriter) MarshalInt64(v int64) *AddressWriter

func (*AddressWriter) MarshalString

func (b *AddressWriter) MarshalString(v string) *AddressWriter

func (*AddressWriter) MarshalStringMap

func (b *AddressWriter) MarshalStringMap(v map[string]string) *AddressWriter

func (*AddressWriter) MarshalStringOpt added in v0.53.0

func (b *AddressWriter) MarshalStringOpt(v string) *AddressWriter

func (*AddressWriter) MarshalStringSlice

func (b *AddressWriter) MarshalStringSlice(v []string) *AddressWriter

type HexAddressProvider

type HexAddressProvider struct{}

func NewHexAddressProvider

func NewHexAddressProvider() *HexAddressProvider

func (*HexAddressProvider) ContentAddress

func (*HexAddressProvider) ContentAddress(entity Identifiable) string

type Identifiable

type Identifiable interface {
	Identity() []byte
}

Jump to

Keyboard shortcuts

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