type_blobs

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default                    = golf_tb.Default
	DefaultWithPandocFormatter = golf_tb.DefaultWithPandocFormatter
	DefaultPandocDefaults      = golf_tb.DefaultPandocDefaults
	DefaultPandocLuaFilter     = golf_tb.DefaultPandocLuaFilter
	DefaultTaskType            = golf_tb.DefaultTaskType
	DefaultChoreType           = golf_tb.DefaultChoreType
)
View Source
var (
	DecodeTomlV0           = golf_tb.DecodeTomlV0
	DecodeTomlV1           = golf_tb.DecodeTomlV1
	DecodeTomlV2           = golf_tb.DecodeTomlV2
	DecodeReferencesConfig = golf_tb.DecodeReferencesConfig
)
View Source
var CoderToTypedBlob = hyphence.CoderToTypedBlob[Blob]{
	Metadata: hyphence.TypedMetadataCoder[Blob]{},
	Blob: hyphence.CoderTypeMapWithoutType[Blob](
		map[string]interfaces.CoderBufferedReadWriter[*Blob]{
			ids.TypeTomlTypeV0: hyphence.CoderTommy[
				Blob,
				*Blob,
			]{
				Decode: func(b []byte) (Blob, error) {
					doc, err := golf_tb.DecodeTomlV0(b)
					if err != nil {
						return &TomlV0{}, nil
					}
					return doc.Data(), nil
				},
				Encode: func(blob Blob) ([]byte, error) {
					doc, err := golf_tb.DecodeTomlV0(nil)
					if err != nil {
						return nil, err
					}
					if v, ok := blob.(*TomlV0); ok {
						*doc.Data() = *v
					}
					return doc.Encode()
				},
			},
			ids.TypeTomlTypeV1: hyphence.CoderTommy[
				Blob,
				*Blob,
			]{
				Decode: func(b []byte) (Blob, error) {
					doc, err := golf_tb.DecodeTomlV1(b)
					if err != nil {
						return &TomlV1{}, nil
					}
					return doc.Data(), nil
				},
				Encode: func(blob Blob) ([]byte, error) {
					doc, err := golf_tb.DecodeTomlV1(nil)
					if err != nil {
						return nil, err
					}
					if v, ok := blob.(*TomlV1); ok {
						*doc.Data() = *v
					}
					return doc.Encode()
				},
			},
			ids.TypeTomlTypeV2: hyphence.CoderTommy[
				Blob,
				*Blob,
			]{
				Decode: func(b []byte) (Blob, error) {
					doc, err := golf_tb.DecodeTomlV2(b)
					if err != nil {
						return &TomlV2{}, nil
					}
					return doc.Data(), nil
				},
				Encode: func(blob Blob) ([]byte, error) {
					doc, err := golf_tb.DecodeTomlV2(nil)
					if err != nil {
						return nil, err
					}
					if v, ok := blob.(*TomlV2); ok {
						*doc.Data() = *v
					}
					return doc.Encode()
				},
			},
		},
	),
}

Functions

This section is empty.

Types

type Blob

type Blob = golf_tb.Blob

type Coder added in v0.1.5

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

func MakeTypeStore added in v0.1.5

func MakeTypeStore(
	envRepo env_repo.Env,
) Coder

func (Coder) ParseTypedBlob added in v0.1.5

func (store Coder) ParseTypedBlob(
	tipe domain_interfaces.ObjectId,
	blobId mad_domain_interfaces.MarklId,
) (common Blob, repool interfaces.FuncRepool, n int64, err error)

func (Coder) SaveBlobText added in v0.1.5

func (store Coder) SaveBlobText(
	tipe domain_interfaces.ObjectId,
	blob Blob,
) (digest mad_domain_interfaces.MarklId, n int64, err error)

type FieldDefinition

type FieldDefinition = golf_tb.FieldDefinition

type ReferencesConfig

type ReferencesConfig = golf_tb.ReferencesConfig

type TomlV0

type TomlV0 = golf_tb.TomlV0

type TomlV1

type TomlV1 = golf_tb.TomlV1

type TomlV2

type TomlV2 = golf_tb.TomlV2

type TypedBlob added in v0.1.5

type TypedBlob = hyphence.TypedBlob[Blob]

type UTIGroup

type UTIGroup = golf_tb.UTIGroup

type WithFields

type WithFields = golf_tb.WithFields

type WithFormatterUTIGroups

type WithFormatterUTIGroups = golf_tb.WithFormatterUTIGroups

type WithFormatters

type WithFormatters = golf_tb.WithFormatters

type WithReferences

type WithReferences = golf_tb.WithReferences

type WithStringLuaHooks

type WithStringLuaHooks = golf_tb.WithStringLuaHooks

Source Files

  • coder.go
  • coding.go
  • main.go

Jump to

Keyboard shortcuts

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