Documentation ¶
Overview ¶
Package quota is used to handle all quota-service related operations. Handling is implemented with a HTTP router returned from NewRouter and setup its routes using Setup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is a structure that handles quota related requests.
func NewRouter ¶
func NewRouter( quotaConn *grpcPoolTypes.ConnPool, logger *logrus.Logger, ) *Router
NewRouter creates a new Router, and initializes clients of the quota Service with the given connection. If logger is non-nil then it will be set as-is, otherwise logger would default to logrus.New().
func (*Router) GetOwnerQuota ¶
GetOwnerQuota is the request handler for GET /user/quota
func (*Router) GetQuotaByID ¶
GetQuotaByID is the request handler for GET /users/:id/quota
func (*Router) Setup ¶
func (r *Router) Setup(rg *gin.RouterGroup)
Setup sets up r and intializes its routes under rg.
Click to show internal directories.
Click to hide internal directories.