model

package
v0.0.0-...-bf83fb3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlgoliaSyncStatusPending  = "pending"
	AlgoliaSyncStatusFailed   = "failed"
	AlgoliaSyncStatusComplete = "complete"
)

Variables

This section is empty.

Functions

func CreateAlgoliaObjectID

func CreateAlgoliaObjectID(prefix string, itemType string, id int) string

CreateAlgoliaObjectID returns a string that represents the algolia object id Uniqueness comes from the item type/item id combination. If a non-empty string is provided as the prefix, it will be added to the begining of the generated id.

Types

type AlgoliaConfig

type AlgoliaConfig struct {
	App           string
	Key           string
	Index         string
	NumGoRoutines int
}

AlgoliaConfig contains the config information for the Algolia account to use

type AlgoliaObject

type AlgoliaObject struct {
	ObjectID string `json:"objectID"`
}

AlgoliaObject an Algolia object

type AlgoliaSync

type AlgoliaSync struct {
	ID              int
	AlgoliaIndex    string
	AlgoliaObjectID string
	ItemID          int
	ItemType        string
	Item            []byte
	ItemHash        string
	Status          string
	ForDelete       bool
	CreatedOn       string
	UpdatedOn       string
}

AlgoliaSync model

func (*AlgoliaSync) MarshalJSON

func (ags *AlgoliaSync) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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