Documentation
¶
Overview ¶
Package api defines the API V1 implementation for tenant-api.
Index ¶
Constants ¶
View Source
const ( // TenantIDService is the GID service portion of the prefix. TenantIDService = "tnnt" // TenantIDResource is the GID resource portion of the prefix. TenantIDResource = "ten" // TenantIDPrefix is the full prefix for a Tenant GID. TenantIDPrefix = TenantIDService + TenantIDResource )
Variables ¶
View Source
var ( // ErrInvalidID is returned when a ID is invalid ErrInvalidID = errors.New("invalid ID") // ErrIDNotFound is returned when a ID is not found in the path ErrIDNotFound = errors.New("ID not found in path") // ErrTenantNameMissing is returned when the Tenant Name is not defined. ErrTenantNameMissing = errors.New("tenant name is missing") )
Functions ¶
This section is empty.
Types ¶
type PaginationParams ¶
type PaginationParams struct { Limit int `json:"limit,omitempty"` Page int `json:"page,omitempty"` Cursor string `json:"cursor,omitempty"` Preload bool `json:"preload,omitempty"` OrderBy string `json:"orderby,omitempty"` }
PaginationParams allow you to paginate the results
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router provides a router for the API
func (*Router) DatabaseCheck ¶ added in v0.0.5
DatabaseCheck ensure the database connection is established.
type RouterOption ¶ added in v0.0.5
type RouterOption func(r *Router)
RouterOption defines the router option type.
func WithLogger ¶ added in v0.0.5
func WithLogger(logger *zap.Logger) RouterOption
WithLogger sets the logger for the service.
func WithMiddleware ¶ added in v0.0.5
func WithMiddleware(mdw ...echo.MiddlewareFunc) RouterOption
WithMiddleware includes the provided middleware with the api.
Click to show internal directories.
Click to hide internal directories.