webhandler

package
Version: v2.0.0-...-a70d572 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyUserID     = "user_id"
	KeyFullName   = "fullname"
	KeyAuthorized = "authorized"
	KeyExpiresAt  = "expires_at"

	EnvJwtAccessSecret = "JWT_ACCESS_SECRET" // environment variable to set secret for JWT token

	HeaderAuthorization = "Authorization"
	HeaderUserID        = "mc_userid"

	AccessToken = "access_token"

	DefaultExpiration = time.Hour * 24 * 7 // 24 * 7 days

	SecureShareDirWebHandlerPath   = "/secure_share"
	InsecureShareDirWebHandlerPath = "/insecure_share"
)

global constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionConfig

type ActionConfig struct {
	Resource string `json:"resource"`
	KayPath  string `json:"keypath"`
	Payload  string `json:"payload"`
}

ActionConfig struct

type JwtToken

type JwtToken struct {
	ID    string `json:"id"`
	Email string `json:"email"`
}

JwtToken struct

type JwtTokenResponse

type JwtTokenResponse struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	FullName string `json:"fullName"`
	Email    string `json:"email"`
	Token    string `json:"token"`
}

JwtTokenResponse struct

type Response

type Response struct {
	Success bool        `json:"success"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Response struct

type UserLogin

type UserLogin struct {
	Username  string `json:"username"`
	Password  string `json:"password"`
	ExpiresIn string `json:"expiresIn"`
}

UserLogin struct

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL