decoder

package
v0.0.0-...-7687a33 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeFederationModuleSync

func DecodeFederationModuleSync(in []byte) (ftypes.ExposedModuleSet, error)

func DecodeModuleSync

func DecodeModuleSync(in []byte) (types.ModuleSet, error)

DecodeModuleSync decodes the response from the structure sync request.

It returns a set of modules.

func DecodeRecordSync

func DecodeRecordSync(in []byte) (types.RecordSet, *types.RecordFilter, error)

DecodeRecordSync decodes the response from the data sync request.

It returns a set of records along with the used filter.

Types

type ComposeModule

type ComposeModule struct {
	types.Module
}

type ComposeRecord

type ComposeRecord struct {
	types.Record
}

type ComposeRecordDocument

type ComposeRecordDocument struct {
	Response ComposeRecordResponse
}

type ComposeRecordFilter

type ComposeRecordFilter struct {
	types.RecordFilter
}

type ComposeRecordResponse

type ComposeRecordResponse struct {
	Filter ComposeRecordFilter `json:",omitempty"`
	Set    ComposeRecordSet    `json:",omitempty"`
}

Bits for decoding data sync

type ComposeRecordSet

type ComposeRecordSet []*ComposeRecord

type ExposedModule

type ExposedModule struct {
	ftypes.ExposedModule
}

type ExposedModuleDocument

type ExposedModuleDocument struct {
	Response struct {
		Set ftypes.ExposedModuleSet
	}
}

type ExposedRecord

type ExposedRecord struct {
	ID     uint64               `json:"recordID,string"`
	Values types.RecordValueSet `json:"values"`

	CreatedAt time.Time  `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
}

func DecodeFederationRecordSync

func DecodeFederationRecordSync(in []byte) ([]*ExposedRecord, error)

type ExposedRecordDocument

type ExposedRecordDocument struct {
	Response struct {
		Set []*ExposedRecord
	}
}

type ModuleDocument

type ModuleDocument struct {
	Response ComposeModule
}

Bits for decoding structure sync

Jump to

Keyboard shortcuts

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