Documentation
¶
Overview ¶
Package v1beta1 is the v1beta version of the api
Index ¶
Constants ¶
View Source
const ( // UserStatusActive is the status for an active user UserStatusActive = "active" // UserStatusPending is the status for a pending user UserStatusPending = "pending" // UserStatusSuspended is the status for a suspended user UserStatusSuspended = "suspended" )
View Source
const (
// Version is the API version constant
Version = "v1beta1"
)
Variables ¶
View Source
var ErrInvalidFunctionParameter = errors.New("InvalidFunctionParameter")
ErrInvalidFunctionParameter is returned when a function parameter fails an assertion
View Source
var ErrInvalidQueryParameterValue = errors.New("InvalidQueryParameterValue")
ErrInvalidQueryParameterValue is returned when the query parameter value is invalid
Functions ¶
This section is empty.
Types ¶
type PaginationParams ¶
type PaginationParams struct {
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
Last bool `json:"last,omitempty"`
NextCursor string `json:"next_cursor,omitempty"`
PrevCursor string `json:"prev_cursor,omitempty"`
SortBy string `json:"sort_by,omitempty"`
SortOrder string `json:"sort_order,omitempty"`
OrderBy string `json:"orderby,omitempty"`
}
PaginationParams is the params to be parsed from query params from a gin context
type PaginationResponse ¶
type PaginationResponse[modelType any] struct { TotalRecordCount int64 `json:"total_record_count,omitempty"` NextCursor string `json:"next_cursor,omitempty"` PrevCursor string `json:"prev_cursor,omitempty"` Records []modelType `json:"records"` }
PaginationResponse is the response given to GET requests requiring pagination
type Router ¶
type Router struct {
AdminGroups []string
AuditLogWriter io.Writer
AuditMW *ginaudit.Middleware
AuthMW *ginauth.MultiTokenMiddleware
AuthConf []ginjwt.AuthConfig
DB *sqlx.DB
EventBus *eventbus.Client
Logger *zap.Logger
}
Router is the API router
func (*Router) Routes ¶
func (r *Router) Routes(rg *gin.RouterGroup)
Routes sets up protected routes and sets the scopes for said routes
Click to show internal directories.
Click to hide internal directories.