responses

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PermissionCheckResponse

type PermissionCheckResponse struct {
	Allowed bool `json:"allowed"`

} // @name PermissionCheckResponse

PermissionCheckResponse is the response for GET /auth/users/:userID/permissions/check.

type PolicyListResponse

type PolicyListResponse struct {
	Permissions [][]string `json:"permissions"`

} // @name PolicyListResponse

PolicyListResponse is the response for GET /auth/roles/:name/permissions and GET /auth/permissions — each entry is a [role, resource, action] casbin policy line.

type ResourceListResponse

type ResourceListResponse struct {
	Resources []ResourceResponse `json:"resources"`

} // @name ResourceListResponse

ResourceListResponse is the response for GET /auth/resources.

type ResourceResponse

type ResourceResponse struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Actions     []string  `json:"actions"`
	CreatedAt   time.Time `json:"createdAt"`

} // @name ResourceResponse

ResourceResponse mirrors repositories.Resource's exported fields for the generic resource-management API. Not constructed from a *repositories.Resource here — same import-cycle reasoning as RoleResponse above (see handlers.newResourceResponse instead).

type RoleListResponse

type RoleListResponse struct {
	Roles []RoleResponse `json:"roles"`

} // @name RoleListResponse

RoleListResponse is the response for GET /auth/roles and GET /auth/users/:userID/roles.

type RoleResponse

type RoleResponse struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Metadata    map[string]interface{} `json:"metadata"`
	CreatedAt   time.Time              `json:"createdAt"`

} // @name RoleResponse

RoleResponse mirrors repositories.Role's exported fields for the generic role-management API. Deliberately not constructed from a *repositories.Role here (see handlers.NewRoleResponse instead) — this package sits downstream of modules/auth/repositories in the import graph (via interfaces -> models/responses), so importing repositories back from here would be a cycle.

type TokenResponse

type TokenResponse struct {
	AccessToken  string            `json:"accessToken"`
	TokenType    string            `json:"tokenType"`
	ExpiresIn    int64             `json:"expiresIn"`
	RefreshToken string            `json:"refreshToken,omitempty"`
	Scopes       map[string]string `json:"scopes,omitempty"`
	User         *UserResponse     `json:"user,omitempty"`

} // @name TokenResponse

TokenResponse represents the response after successful authentication

type UserResponse

type UserResponse struct {
	ID            uuid.UUID      `json:"id"`
	Username      string         `json:"username"`
	Email         string         `json:"email"`
	PhoneNumber   string         `json:"phoneNumber"`
	Role          string         `json:"role"`
	EmailVerified bool           `json:"emailVerified"`
	Metadata      map[string]any `json:"metadata,omitempty"`

} // @name UserResponse

UserResponse represents user information in API responses

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL