Documentation ¶
Index ¶
Constants ¶
View Source
const Name = "Account"
Name is the role/resource name.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { ID AccountID Email string Name string Bio optional.Optional[string] Admin bool ThreadCount int PostCount int Interests []tag.Tag CreatedAt time.Time UpdatedAt time.Time DeletedAt optional.Optional[time.Time] }
func (*Account) GetResourceName ¶
type Repository ¶
type Repository interface { Create(ctx context.Context, email string, username string, opts ...option) (*Account, error) GetByID(ctx context.Context, id AccountID) (*Account, error) LookupByEmail(ctx context.Context, email string) (*Account, bool, error) List(ctx context.Context, sort string, max, skip int) ([]Account, error) }
func New ¶
func New(db *model.Client) Repository
func NewLocal ¶
func NewLocal() Repository
Click to show internal directories.
Click to hide internal directories.