qcloud

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 12 Imported by: 1

README

qcloud

tencent cloud api plugin for rack

Documentation

Index

Constants

View Source
const (
	ID            = "qcloud"
	Comment       = "qcloud api"
	RoutePrefix   = "/" + ID
	DefaultEnable = false
)

Variables

View Source
var Module = module.Module{
	ID:      ID,
	Comment: Comment,

	RouteFunc:   AddRoute,
	RoutePrefix: RoutePrefix,

	FlagFunc: ServeFlag,
}

Functions

func AddRoute

func AddRoute(g *gin.Engine)

func Allow

func Allow(c *gin.Context)

func IsIPv4

func IsIPv4(ip string) bool

func IsLanIPv4

func IsLanIPv4(ip string) bool

func NewClient

func NewClient(endpoint string) *vpc.Client

func ServeFlag

func ServeFlag(serveCmd *cobra.Command)

Types

type SGRule

type SGRule struct {
	IP     string `json:"ip" form:"ip" validate:"required,ip"`
	SGID   string `json:"sgid" form:"sgid" validate:"required"`
	Remark string `json:"remark" form:"remark" validate:"required"`
	Policy string `json:"policy" form:"policy" validate:"required"`
}

Jump to

Keyboard shortcuts

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