codec

package
v0.0.0-...-6af4c40 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeAddRoleRequest

func DecodeAddRoleRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeAddRoleRequest decode request

func DecodeAssignActionsRequest

func DecodeAssignActionsRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeAssignActionsRequest decode request

func DecodeAssignModulesRequest

func DecodeAssignModulesRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeAssignModulesRequest decode request

func DecodeAssignSectionsRequest

func DecodeAssignSectionsRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeAssignSectionsRequest decode request

func DecodeAssignSubModulesRequest

func DecodeAssignSubModulesRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeAssignSubModulesRequest decode request

func DecodeAssignUnassignRoleRequest

func DecodeAssignUnassignRoleRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeAssignUnassignRoleRequest decode request

func DecodeCloneRoleRequest

func DecodeCloneRoleRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeCloneRoleRequest decode request

func DecodeDeleteRoleRequest

func DecodeDeleteRoleRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeDeleteRoleRequest decode request

func DecodeEditRoleRequest

func DecodeEditRoleRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeEditRoleRequest decode request

func DecodeEmptyRequest

func DecodeEmptyRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeEmptyRequest generic decoder for request with no parameteres, like GET /users

func DecodeGetAccessRequest

func DecodeGetAccessRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeGetAccessRequest decode request

func DecodeGetActionsRequest

func DecodeGetActionsRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeGetActionsRequest decode request

func DecodeGetRoleRequest

func DecodeGetRoleRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeGetRoleRequest decode request

func DecodeGetRolesByUserRequest

func DecodeGetRolesByUserRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeGetRolesByUserRequest decode request

func DecodeLoginRequest

func DecodeLoginRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeLoginRequest decode login request

func DecodeModuleNameRequest

func DecodeModuleNameRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeModuleNameRequest decode request

func DecodePaginatedListRequest

func DecodePaginatedListRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodePaginatedListRequest decode paginated list request

func DecodeUnassignActionsRequest

func DecodeUnassignActionsRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeUnassignActionsRequest decode request

func DecodeUnassignModulesRequest

func DecodeUnassignModulesRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeUnassignModulesRequest decode request

func DecodeUnassignSectionsRequest

func DecodeUnassignSectionsRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeUnassignSectionsRequest decode request

func DecodeUnassignSubModulesRequest

func DecodeUnassignSubModulesRequest(_ context.Context, r *http.Request) (interface{}, error)

DecodeUnassignSubModulesRequest decode request

func EncodeResponse

func EncodeResponse(w http.ResponseWriter, response interface{}) error

EncodeResponse generic encoder

func HTTPErrorEncoder

func HTTPErrorEncoder(logger conf.LoggerWrapper) gokitHTTP.ErrorEncoder

HTTPErrorEncoder generic error handler for unhandled exceptions

func JSONEncoder

func JSONEncoder(logger conf.LoggerWrapper) gokitHTTP.EncodeResponseFunc

JSONEncoder json encoder that handle errors and valid responses

Types

type EmptyResponse

type EmptyResponse struct {
	Err error `json:"error,omitempty"`
}

EmptyResponse Empty response, just OK or Error

type IDResponse

type IDResponse struct {
	ID string `json:"id,omitempty"`
}

IDResponse ID response

type ListMapString

type ListMapString struct {
	List []map[string]string `json:"list"`
}

ListMapString map of string

type MapOfMapStringList

type MapOfMapStringList struct {
	List map[string]map[string][]string `json:"list"`
}

type MapString

type MapString struct {
	List map[string]string `json:"list"`
}

MapString map of string

type MapStringList

type MapStringList struct {
	List map[string][]string `json:"list"`
}

MapStringList list of string

type NoContentResponse

type NoContentResponse struct{}

NoContentResponse 204 response

type Pagination

type Pagination struct {
	Query string
	Sort  string
	Page  int
	Limit int
}

type StringList

type StringList struct {
	List []string `json:"list"`
}

StringList list of string

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

TokenResponse token response

Jump to

Keyboard shortcuts

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