todo

package
v0.0.0-...-599a714 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package todo holds the domain types for the Silicon Starter project. You'll likely want to rename this package to whatever your domain or project actually is.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithUserID

func WithUserID(ctx context.Context, id UserID) context.Context

Types

type Tags

type Tags []string

func TagsFromStored

func TagsFromStored(in string) Tags

func (Tags) Add

func (ts Tags) Add(tag string) Tags

func (Tags) Clone

func (in Tags) Clone() Tags

func (Tags) Remove

func (tags Tags) Remove(tag string) Tags

func (Tags) ToStored

func (tags Tags) ToStored() string

type Task

type Task struct {
	ID        TaskID
	Name      string
	Body      string
	Tags      Tags
	CreatedBy UserID
}

func (*Task) Clone

func (t *Task) Clone() *Task

type TaskID

type TaskID string

This block contains typed IDs used in the ecosystem, each one representing a different entity. Unless otherwise noted, an instance of an ID should uniquely represent a single entity of that type.

Keep this block sorted alphabetically to minimize merge conflicts.

type User

type User struct {
	ID                UserID
	Name              string
	Email             string
	CreatedAt         time.Time
	AuthnProviderType authn.Provider
	AuthnProviderID   authn.UserID
}

func (*User) Clone

func (u *User) Clone() *User

type UserID

type UserID string

This block contains typed IDs used in the ecosystem, each one representing a different entity. Unless otherwise noted, an instance of an ID should uniquely represent a single entity of that type.

Keep this block sorted alphabetically to minimize merge conflicts.

func UserIDFromContext

func UserIDFromContext(ctx context.Context) (UserID, error)

Jump to

Keyboard shortcuts

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