admin

package
v0.0.0-...-835c9c4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentSettings

func CurrentSettings(c buffalo.Context) error

CurrentSettings returns the current application settings

swagger:route GET /api/v1/admin/settings admin currentSettings Returns the current application settings. responses:

  200: adminCurrentSettingsResponse
	 400: errorResponse
	 401: errorResponse
	 403: errorResponse
	 422: errorResponse
	 500: errorResponse

func Group

func Group(c buffalo.Context) error

Group returns a group and its users

swagger:route GET /api/v1/admin/groups/{id} admin group Returns a group and its users. responses:

  200: adminGroupResponse
	 400: errorResponse
	 401: errorResponse
	 403: errorResponse
	 422: errorResponse
	 500: errorResponse

func Groups

func Groups(c buffalo.Context) error

Groups returns a paginated list of groups

swagger:route GET /api/v1/admin/groups admin groups Returns a paginated list of groups. responses:

  200: adminGroupsResponse
	 400: errorResponse
	 401: errorResponse
	 403: errorResponse
	 422: errorResponse
	 500: errorResponse

func Impersonate

func Impersonate(c buffalo.Context) error

Impersonate allows an administrator to impersonate a user

swagger:route GET /api/v1/admin/impersonate/{id} admin impersonate Gets an authentication token for an admin that allows scoping as a user responses:

  200: tokenResponse
	 400: errorResponse
	 401: errorResponse
	 403: errorResponse
	 422: errorResponse
	 500: errorResponse

func User

func User(c buffalo.Context) error

User returns a user and its group.

swagger:route GET /api/v1/admin/users/{id} admin user Returns a user and its group. responses:

  200: adminUserResponse
	 400: errorResponse
	 401: errorResponse
	 403: errorResponse
	 422: errorResponse
	 500: errorResponse

func Users

func Users(c buffalo.Context) error

Users returns a list of paginated users

swagger:route GET /api/v1/admin/users admin users Returns a paginated list of users. responses:

  200: adminUsersResponse
	 400: errorResponse
	 401: errorResponse
	 403: errorResponse
	 422: errorResponse
	 500: errorResponse

Types

type CurrentSettingsResponse

type CurrentSettingsResponse struct {
	//in:body
	Body *models.Setting
}

CurrentSettingsResponse returns a synchronized Google sheet swagger:response adminCurrentSettingsResponse

type GroupParameters

type GroupParameters struct {
	// in:path
	// required:true
	ID int `json:"id"`
}

GroupParameters documents the inbound parameters used for the Group endpoint swagger:parameters group

type GroupResponse

type GroupResponse struct {
	//in:body
	Body GroupResponsePayload
}

GroupResponse returns the queried zgroups swagger:response adminGroupResponse

type GroupResponsePayload

type GroupResponsePayload struct {
	Group *models.Group  `json:"group"`
	Users []*models.User `json:"users"`
}

GroupResponsePayload contains the queried group and its users

type GroupsResponse

type GroupsResponse struct {
	//in:body
	Body GroupsResponsePayload
}

GroupsResponse returns the queried groups swagger:response adminGroupsResponse

type GroupsResponsePayload

type GroupsResponsePayload struct {
	Groups     []*models.Group      `json:"groups"`
	Pagination *modelext.Pagination `json:"pagination"`
}

GroupsResponsePayload contains paginated groups

type ImpersonateParameters

type ImpersonateParameters struct {
	// in:path
	// required:true
	ID int `json:"id"`
}

ImpersonateParameters documents the inbound parameters used for the Impersonate endpoint swagger:parameters impersonate

type UserParameters

type UserParameters struct {
	// in:path
	// required:true
	ID int `json:"id"`
}

UserParameters documents the inbound parameters used for the User endpoint swagger:parameters user

type UserResponse

type UserResponse struct {
	//in:body
	Body UserResponsePayload
}

UserResponse returns the queried user swagger:response adminUserResponse

type UserResponsePayload

type UserResponsePayload struct {
	User *modelext.UserWithGroup `json:"user"`
}

UserResponsePayload contains the queried user

type UsersResponse

type UsersResponse struct {
	//in:body
	Body UsersResponsePayload
}

UsersResponse returns the queried users swagger:response adminUsersResponse

type UsersResponsePayload

type UsersResponsePayload struct {
	Users      []*modelext.UserWithGroup `json:"users"`
	Pagination *modelext.Pagination      `json:"pagination"`
}

UsersResponsePayload contains the paginated users

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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