domain

package
v0.0.0-...-b5678d6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthDomainService

type AuthDomainService interface {
	GetUserIDByToken(ctx context.Context, token string) (uuid.UUID, error)
}

type CreateNoteParams

type CreateNoteParams struct {
	UserID     uuid.UUID
	CategoryID uuid.NullUUID
	Title      string
	Content    string
	Pinned     bool
	Priority   int32
}

type ListNotesParams

type ListNotesParams struct {
	UserID uuid.UUID
	Limit  *int32
	Offset *int32
}

type Note

type Note struct {
	ID         uuid.UUID  `json:"id"`
	UserID     uuid.UUID  `json:"user_id"`
	CategoryID *uuid.UUID `json:"category_id"`
	Title      string     `json:"title"`
	Content    string     `json:"content"`
	Pinned     bool       `json:"pinned"`
	Priority   int32      `json:"priority"`
	UpdatedAt  time.Time  `json:"update_at"`
	CreatedAt  time.Time  `json:"create_at"`
}

type NoteRepository

type NoteRepository interface {
	ListNotes(ctx context.Context, arg *ListNotesParams) ([]*Note, error)
	GetNote(ctx context.Context, userID uuid.UUID, id uuid.UUID) (*Note, error)
	CreateNote(ctx context.Context, arg *CreateNoteParams) (*Note, error)
	UpdateNote(ctx context.Context, arg *UpdateNoteParams) (*Note, error)
	DeleteNote(ctx context.Context, userID uuid.UUID, id uuid.UUID) error
}

type NoteUseCase

type NoteUseCase interface {
	ListNotes(ctx context.Context, arg *ListNotesParams) ([]*Note, error)
	GetNote(ctx context.Context, userID uuid.UUID, id uuid.UUID) (*Note, error)
	CreateNote(ctx context.Context, arg *CreateNoteParams) (*Note, error)
	UpdateNote(ctx context.Context, arg *UpdateNoteParams) (*Note, error)
	DeleteNote(ctx context.Context, userID uuid.UUID, id uuid.UUID) error
}

type UpdateNoteParams

type UpdateNoteParams struct {
	ID       uuid.UUID
	UserID   uuid.UUID
	Title    string
	Content  string
	Pinned   bool
	Priority int32
}

Jump to

Keyboard shortcuts

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