Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { UUID uuid.UUID `gorm:"type:uuid;primaryKey" json:"uuid" binding:"-"` CreatedAt time.Time `json:"createdAt" binding:"-"` UpdatedAt time.Time `json:"updatedAt" binding:"-"` DeletedAt gorm.DeletedAt `json:"-" binding:"-"` Name string `json:"name" binding:"required"` Description string `json:"description" ` Owner uuid.UUID `gorm:"index,not null" json:"-" ` }
Account to iterate with database
func (*Account) BeforeCreate ¶
BeforeCreate execute commands before creating a Account
type Repository ¶
type Repository interface { Delete(ctx context.Context, pk uuid.UUID, owner uuid.UUID) error Get(ctx context.Context, pk uuid.UUID, owner uuid.UUID) (*Account, error) Save(ctx context.Context, account *Account) error Query(ctx context.Context, filters *rest.Query) ([]*Account, error) }
Repository interface defines methods to manipute user's accounts
Click to show internal directories.
Click to hide internal directories.