usernotes

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package usernotes maintains notes of a user

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgresStore

func NewPostgresStore(pqdriver *pgxpool.Pool, tableName string) store

Types

type Note

type Note struct {
	ID        string
	Title     string
	Content   string
	Creator   *users.User
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (*Note) Sanitize

func (note *Note) Sanitize()

func (*Note) ValidateForCreate

func (note *Note) ValidateForCreate() error

type UserNotes

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

func NewService

func NewService(store store) *UserNotes

func (*UserNotes) GetNoteByID

func (un *UserNotes) GetNoteByID(ctx context.Context, userID string, noteID string) (*Note, error)

func (*UserNotes) SaveNote

func (un *UserNotes) SaveNote(ctx context.Context, note *Note) (*Note, error)

Jump to

Keyboard shortcuts

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