store

package
v0.3.0-beta0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	Key     string `datastore:"-"`
	Name    string
	Tags    []string
	OwnerID string

	// Timestamps keeps track of creation and modification times and stores a randomly
	// generated UUID to maintain consistency.
	Timestamps timestamps.Timestamps
}

Store represents a Open Saves store in the metadata database. See the Open Saves API definition for details.

func FromProto

func FromProto(p *pb.Store) *Store

FromProto creates a new Store instance from a proto. Passing nil returns a zero-initialized Store.

func (*Store) Load

func (s *Store) Load(ps []datastore.Property) error

Load implements the Datastore PropertyLoadSaver interface and converts Datstore properties to the Properties field.

func (*Store) LoadKey

func (s *Store) LoadKey(k *datastore.Key) error

LoadKey implements the KeyLoader interface and sets the value to the Key field.

func (*Store) Save

func (s *Store) Save() ([]datastore.Property, error)

Save implements the Datastore PropertyLoadSaver interface and converts the properties field in the struct to separate Datastore properties.

func (*Store) ToProto

func (s *Store) ToProto() *pb.Store

ToProto converts the structure a proto.

Jump to

Keyboard shortcuts

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