Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type URL ¶
type URL struct { ID interface{} `json:"-" bson:"_id,omitempty" db:"id"` UserID interface{} `json:"-" bson:"user_id" db:"user_id"` Hash string `json:"hash" bson:"hash" db:"hash"` OriginalURL string `json:"original_url" bson:"original_url" db:"original_url" binding:"required"` CreationDate time.Time `json:"creation_date" bson:"creation_date" db:"creation_date"` ExpirationDate time.Time `json:"expiration_date" bson:"expiration_date" db:"expiration_date"` }
type URLRepository ¶
type User ¶
type User struct { ID interface{} `json:"-" bson:"_id,omitempty" db:"id"` Name string `json:"name" bson:"name" db:"name" binding:"required"` Username string `json:"username" bson:"username" db:"username" binding:"required"` Password string `json:"password" bson:"password_hash" db:"password_hash" binding:"required"` }
type UserRepository ¶
type UserRepository interface { Create(ctx context.Context, user User) (interface{}, error) Get(ctx context.Context, username, password string) (User, error) Update(ctx context.Context, user User) error Delete(ctx context.Context, username, password string) error UsernameExists(ctx context.Context, username string) (bool, error) }
Click to show internal directories.
Click to hide internal directories.