api

package
v0.0.0-...-b1757e7 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 4 Imported by: 0

README

RESTful API for Login and Logout

  • http method: POST/GET/PUT/DELETE/PATCH...
  • http path: /users/list, /users/get

RESTful: representational state transfer

params:

  • header
  • URL
    • path param: /users/02
    • url param: /users/01?key1=...
  • HTTP body

for token apis:

  • POST /tokens/: create tokens, params in http body
  • DELETE /tokens/: delete tokens, params in header

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenApiHandler

type TokenApiHandler struct {
	// contains filtered or unexported fields
}

func NewTokenApiHandler

func NewTokenApiHandler() *TokenApiHandler

func (*TokenApiHandler) Init

func (h *TokenApiHandler) Init() error

func (*TokenApiHandler) Login

func (h *TokenApiHandler) Login(c *gin.Context)

func (*TokenApiHandler) Logout

func (h *TokenApiHandler) Logout(c *gin.Context)

func (*TokenApiHandler) Name

func (h *TokenApiHandler) Name() string

func (*TokenApiHandler) Registry

func (h *TokenApiHandler) Registry(router gin.IRouter)

Jump to

Keyboard shortcuts

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