meet

package
v0.0.0-...-a014b79 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package meet contains user related CRUD functionality.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is used when a specific Product is requested but does not exist.
	ErrNotFound = errors.New("not found")

	// ErrInvalidID occurs when an ID is not in a valid form.
	ErrInvalidID = errors.New("ID is not in its proper form")
)

Functions

This section is empty.

Types

type Info

type Info struct {
	ID          string    `db:"meet_id"`
	Title       string    `db:"title"`
	Description string    `db:"description"`
	MeetDate    time.Time `db:"meet_date"`
	DateCreated time.Time `db:"date_created"`
	DateUpdated time.Time `db:"date_updated"`
}

Info represents a single meet.

type Meet

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

Meet manages the set of API's for meet access.

func New

func New(log *log.Logger, db *sqlx.DB) Meet

New constructs a Meet for api access.

func (Meet) Create

func (m Meet) Create(ctx context.Context, traceID string, nm NewMeet, now time.Time) (Info, error)

Create adds a Meet to the database.

func (Meet) Query

func (m Meet) Query(ctx context.Context) ([]Info, error)

Query retrieves a list of existing users from the database.

func (Meet) QueryByID

func (m Meet) QueryByID(ctx context.Context, traceID string, meetID string) (Info, error)

QueryByID finds the meet identified by a given ID.

type NewMeet

type NewMeet struct {
	Title       string
	Description string
	MeetDate    time.Time
}

NewOrUpdatedMeet describes the required data for creating a new meet.

Jump to

Keyboard shortcuts

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