controller

package
v0.0.0-...-9632b21 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessTokenController

func AccessTokenController() app.HandlerFunc

func ApolloController

func ApolloController() app.HandlerFunc

func DemoGetController

func DemoGetController() app.HandlerFunc

DemoGetController 展示最基础的 http controller 配置方式,包括获取参数、query、header、body 等 请求路径 http://localhost:8080/api/v1/demo/james/hello?foo=bar

func DemoPostController

func DemoPostController() app.HandlerFunc

DemoPostController post请求

func EncryptController

func EncryptController() app.HandlerFunc

func HttpClientGetInvokeController

func HttpClientGetInvokeController() app.HandlerFunc

func HttpClientPostInvokeController

func HttpClientPostInvokeController() app.HandlerFunc

func LogDebugController

func LogDebugController() app.HandlerFunc

func LogErrorController

func LogErrorController() app.HandlerFunc

func LogFatalController

func LogFatalController() app.HandlerFunc

func LogInfoController

func LogInfoController() app.HandlerFunc

LogInfoController if you want print log with json format, please config log.debug=false if you want print log with pretty format, please config log.debug=true

func LogPanicController

func LogPanicController() app.HandlerFunc

func LogWarnController

func LogWarnController() app.HandlerFunc

func MysqlInsertController

func MysqlInsertController() app.HandlerFunc

func MysqlQueryController

func MysqlQueryController() app.HandlerFunc

func RedisGetController

func RedisGetController() app.HandlerFunc

func RedisSetController

func RedisSetController() app.HandlerFunc

func WeimobApiWosController

func WeimobApiWosController() app.HandlerFunc

func WeimobApiXinyunController

func WeimobApiXinyunController() app.HandlerFunc

Types

type User

type User struct {
	gorm.Model
	UserName string
	Password string
}

User

CREATE TABLE `user` (

`id` bigint(0) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` datetime(3) NULL DEFAULT NULL,
`updated_at` datetime(3) NULL DEFAULT NULL,
`deleted_at` datetime(3) NULL DEFAULT NULL,
`user_name` longtext CHARACTER SET utf8 COLLATE utf8_bin NULL,
`password` longtext CHARACTER SET utf8 COLLATE utf8_bin NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_users_deleted_at`(`deleted_at`) USING BTREE

) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;

Jump to

Keyboard shortcuts

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