comm

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommApi

func NewCommApi(install gore.IGService, obj any) *commapi

Types

type BufferConfig

type BufferConfig struct {
	Addr       string   `json:"addr"`
	Port       int      `json:"port"`
	User       string   `json:"user"`
	Token      string   `json:"token"`
	Comment    string   `json:"comment,omitempty"`
	Ports      []any    `json:"ports,omitempty"`
	Domains    []string `json:"domains,omitempty"`
	Subdomains []string `json:"subdomains,omitempty"`
}

func (*BufferConfig) ParsePorts

func (u *BufferConfig) ParsePorts() []int

type GeneralResponse

type GeneralResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data any    `json:"data"`
	Raw  []byte `json:"-"`
}

func Response

func Response(r *http.Request) (*GeneralResponse, func(w http.ResponseWriter))

func (*GeneralResponse) Any

func (g *GeneralResponse) Any(data any) *GeneralResponse

func (*GeneralResponse) Err

func (g *GeneralResponse) Err(err error) *GeneralResponse

func (*GeneralResponse) Error

func (g *GeneralResponse) Error(msg string) *GeneralResponse

func (*GeneralResponse) Ok

func (*GeneralResponse) Response

func (g *GeneralResponse) Response(code int, msg string) *GeneralResponse

func (*GeneralResponse) Sucess

func (g *GeneralResponse) Sucess(msg string, data any) *GeneralResponse

type Option

type Option struct {
	Label string `json:"label"`
	Value string `json:"value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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