entity

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Word        string
	Translation string

	DeckID string `db:"deck_id"`
	// contains filtered or unexported fields
}

func CardFromDomain

func CardFromDomain(dom domain.Card) *Card

func (*Card) ToDomain

func (c *Card) ToDomain() *domain.Card

func (*Card) UpdateFrom

func (c *Card) UpdateFrom(dom domain.Card) *Card

type Cards

type Cards []Card

func (Cards) ToDomain

func (d Cards) ToDomain() []domain.Card

type Deck

type Deck struct {
	Name string
	// contains filtered or unexported fields
}

func DeckFromDomain

func DeckFromDomain(dom *domain.Deck) *Deck

func (*Deck) ToDomain

func (d *Deck) ToDomain() *domain.Deck

func (*Deck) UpdateFrom

func (d *Deck) UpdateFrom(dom domain.Deck) *Deck

type Decks

type Decks []Deck

func (Decks) ToDomain

func (d Decks) ToDomain() []domain.Deck

Jump to

Keyboard shortcuts

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