firestore

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(ctx context.Context, projectID string, databaseID string) (*Client, error)

func (*Client) Close

func (x *Client) Close() error

func (*Client) GetOrCreateState

func (x *Client) GetOrCreateState(ctx context.Context, msgType types.MsgType, input *model.State) (*model.State, bool, error)

GetOrCreateState returns the state of message processing. If the state is not found, it creates a new state and returns it. If the state is already acquired, it returns the state.

func (*Client) GetState added in v0.1.2

func (x *Client) GetState(ctx context.Context, msgType types.MsgType, id string) (*model.State, error)

GetState returns the state of message processing.

func (*Client) UpdateState

func (x *Client) UpdateState(ctx context.Context, msgType types.MsgType, id string, state types.MsgState, now time.Time) error

UpdateState updates the state of message processing.

Jump to

Keyboard shortcuts

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