tbl

package
v0.0.0-...-36962eb Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppendRowError

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

AppendRowError wraps errors returned by helper method calls in the tbl.Tabler.AppendRow method.

func (*AppendRowError) Error

func (e *AppendRowError) Error() string

type Client

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

Client implements the tbl.Tabler methods using AWS DynamoDB.

func New

func New(newSession *session.Session, tableName string) *Client

New generates a Client pointer instance.

func (*Client) AppendRow

func (c *Client) AppendRow(ctx context.Context, row Row) error

AppendRow implements the tbl.Tabler.AppendRow interface method.

type Row

type Row struct {
	ID            string     `json:"id"`
	Timestamp     time.Time  `json:"timestamp"`
	ItemID        int        `json:"item_id"`
	Event         string     `json:"event"`
	UserID        int        `json:"user_id"`
	UserEmail     string     `json:"email"`
	ProjectID     int        `json:"project_id"`
	ProjectName   string     `json:"project_name"`
	Content       string     `json:"content"`
	Description   string     `json:"description"`
	Notes         []string   `json:"notes"`
	Priority      int        `json:"priority"`
	ParentID      *int       `json:"parent_id,omitempty"`
	SectionID     *int       `json:"section_id,omitempty"`
	SectionName   *string    `json:"section_name,omitempty"`
	LabelIDs      []int      `json:"label_ids"`
	LabelNames    []string   `json:"label_names"`
	Checked       bool       `json:"checked"`
	DateAdded     time.Time  `json:"date_added"`
	DateCompleted *time.Time `json:"date_completed,omitempty"`
}

Row represents a new row to append to the target DynamoDB table.

type Tabler

type Tabler interface {
	AppendRow(ctx context.Context, row Row) error
}

Tabler defines methods for adding event data to AWS DynamoDB.

Jump to

Keyboard shortcuts

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