response

package
v0.0.0-...-a2883fb Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AclAccessListResponse

type AclAccessListResponse struct {
	Permissions []string `json:"permissions"`
	Roles       []string `json:"roles"`
}

func MapAclAccessListResponse

func MapAclAccessListResponse(x *entities.AclMeta) AclAccessListResponse

type AclListResponse

type AclListResponse struct {
	Permissions []PermissionListResponse `json:"permissions"`
	Roles       []RoleListResponse       `json:"roles"`
}

func MapAclListResponse

func MapAclListResponse(x *entities.AclMeta) AclListResponse

type LoginResponse

type LoginResponse struct {
	AccessToken  LoginToken `json:"access_token"`
	RefreshToken LoginToken `json:"refresh_token"`
	Exp          int        `json:"exp"`
}

func MapLoginResponse

func MapLoginResponse(x *entities.AuthTokenMeta) LoginResponse

type LoginToken

type LoginToken struct {
	Sub   string   `json:"sub"`
	JTI   string   `json:"jti"`
	Roles []string `json:"roles,omitempty"`
	Exp   int      `json:"exp"`
}

type PermissionListResponse

type PermissionListResponse struct {
	ID          common.ID `json:"id"`
	Name        string    `json:"name"`
	DisplayName string    `json:"display_name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

func MapPermissionListResponse

func MapPermissionListResponse(x *entities.Permission) PermissionListResponse

func MapPermissionListResponses

func MapPermissionListResponses(x []*entities.Permission) []PermissionListResponse

type RoleListResponse

type RoleListResponse struct {
	ID          common.ID `json:"id"`
	Name        string    `json:"name"`
	DisplayName string    `json:"display_name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

func MapRoleListResponse

func MapRoleListResponse(x *entities.Role) RoleListResponse

func MapRoleListResponses

func MapRoleListResponses(x []*entities.Role) []RoleListResponse

Jump to

Keyboard shortcuts

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