guardian

package
v0.0.0-...-3e9567e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	New(ctx context.Context, args Args) (*ddd.Response[Domain], error)
	One(ctx context.Context, id string) (*ddd.Response[Domain], error)
	ListByPage(ctx context.Context, args ddd.PaginationArgs) (*ddd.Response[Domain], error)
	List(ctx context.Context) (*ddd.Response[core.Option], error)
	Edit(ctx context.Context, args Args) (*ddd.Response[Domain], error)
	Remove(ctx context.Context, id string) (*ddd.Response[Domain], error)
}

type Args

type Args struct {
	Aggregation ddd.AggregationArgs
	GivenNames  string
	FamilyName  string
	Profession  string
	Email       string
	Region      string
	Chiefdom    string
	District    string
	City        string
	Street      string
	School      string
	Phones      []domain.PhoneArgs
}

type Domain

type Domain struct {
	*ddd.Aggregation
	// contains filtered or unexported fields
}

func Existing

func Existing(args Args) (*Domain, error)

func New

func New(args Args) (*Domain, error)

func (*Domain) ActivePhone

func (s *Domain) ActivePhone() domain.Phone

func (*Domain) Args

func (s *Domain) Args() *Args

func (*Domain) Chiefdom

func (s *Domain) Chiefdom() string

func (*Domain) City

func (s *Domain) City() string

func (*Domain) District

func (s *Domain) District() string

func (*Domain) Email

func (s *Domain) Email() string

func (*Domain) FamilyName

func (s *Domain) FamilyName() string

func (*Domain) GivenNames

func (s *Domain) GivenNames() string

func (*Domain) Phones

func (s *Domain) Phones() []domain.Phone

func (*Domain) Profession

func (s *Domain) Profession() string

func (*Domain) Region

func (s *Domain) Region() string

func (*Domain) School

func (s *Domain) School() string

func (*Domain) Street

func (s *Domain) Street() string

type Reference

type Reference struct {
	Id         string
	GivenNames string
	FamilyName string
	Profession string
	Email      string
	Region     string
	Chiefdom   string
	District   string
	City       string
	Street     string
	Phones     []domain.Phone
}

type Repo

type Repo interface {
	Save(args *Domain) (*Domain, error)
	OneById(id string) (*Domain, error)
	ListByPage(args ddd.PaginationArgs) (*ddd.Response[Domain], error)
	List() (*ddd.Response[core.Option], error)
	Remove(args *Domain) (*Domain, error)
}

Jump to

Keyboard shortcuts

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