Documentation ¶
Index ¶
- Constants
- Variables
- type Info
- type NewSeller
- type Seller
- func (s Seller) Create(ctx context.Context, ns NewSeller, date time.Time) (Info, error)
- func (s Seller) QueryAllByPaginate(ctx context.Context, limit, offer int) ([]Info, error)
- func (s Seller) QueryByID(ctx context.Context, id string) (Info, error)
- func (s Seller) QueryByIDs(ctx context.Context, ids []string) ([]Info, error)
Constants ¶
View Source
const (
Collection = "sellers"
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrInvalidID = errors.New("invalid id") )
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct { ID primitive.ObjectID `bson:"_id"` Title string `bson:"title,omitempty" json:"title"` Slug string `bson:"slug,omitempty" json:"slug"` Description string `bson:"description,omitempty" json:"description"` CreatedAt time.Time `bson:"created_at,omitempty" json:"created_at"` }
Info represent a individual seller information.
type NewSeller ¶
type NewSeller struct { Title string `json:"title" validate:"required"` Slug string `json:"slug"` Description string `json:"description"` }
NewSeller what we required for insert data into the database.
type Seller ¶
type Seller struct {
// contains filtered or unexported fields
}
Seller manage set of API's seller access.
func (Seller) QueryAllByPaginate ¶
Click to show internal directories.
Click to hide internal directories.