transport

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_UNAUTHORIZED = "unauthorized"
View Source
const INTERNAL_SERVER_ERROR = "internal_server_error"

System

View Source
const INVALID_BODY = "invalid_request_body"
View Source
const INVALID_CREDENTIALS = "invalid_credentials"
View Source
const SESSION_EXISTS = "session_already_exists"
View Source
const SUCCESS_LOGIN = "login_successful"
View Source
const SUCCESS_LOGOUT = "logout_successful"
View Source
const USER_EXISTS = "user_already_exists"

Constrains

View Source
const VALIDATION_FAILED = "failed_data_validation"

Error message User input

Variables

This section is empty.

Functions

func GetSessionOrTokenFromCookie

func GetSessionOrTokenFromCookie(ctx stk.Context) (*http.Cookie, *http.Cookie, error)

func HandleJsonDecodeError

func HandleJsonDecodeError(err error, ctx stk.Context)

func HandleLoginError

func HandleLoginError(err error, ctx stk.Context)

func HandleLogoutError

func HandleLogoutError(err error, ctx stk.Context)

func HandleRegistrationError

func HandleRegistrationError(err error, ctx stk.Context)

func HandleValidationError

func HandleValidationError(errorMessages map[string]string, ctx stk.Context)

Types

type UserResponse

type UserResponse struct {
	ID        string    `json:"id"`
	Username  string    `json:"username"`
	Email     string    `json:"email"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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