sNet

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.0.9

type Config struct {
	Env        string
	Url        string
	Secure     bool
	Port       int
	Network    string
	PathPrefix string
	Headers    Headers
}

func GetConfig added in v0.0.9

func GetConfig(env string) *Config

GetConfig

func (*Config) AddHeaders added in v0.1.2

func (c *Config) AddHeaders(headers Headers)

func (*Config) AddPathPrefixs added in v0.4.3

func (c *Config) AddPathPrefixs(path_prefixs ...string)

func (Config) Call added in v0.0.9

func (c Config) Call(method string, params string, body io.Reader) ([]byte, error)

func (Config) GetHandlerPath added in v0.1.8

func (c Config) GetHandlerPath(handler string) string

func (Config) GetUri added in v0.6.1

func (c Config) GetUri() string

func (Config) GetUrl added in v0.0.9

func (c Config) GetUrl() string

func (Config) Log added in v0.4.3

func (c Config) Log()

func (Config) Print added in v0.1.2

func (c Config) Print(name string)

func (Config) SendObj added in v0.1.8

func (c Config) SendObj(method, action string, body_obj any) ([]byte, error)

default action is "obj"

func (*Config) Update added in v0.1.0

func (c *Config) Update()
type Header struct {
	Key   string
	Value string
}

type Headers

type Headers []Header

type Services added in v0.4.3

type Services []*Config

func GetServices added in v0.4.3

func GetServices(env string, defaults ...string) (objs Services)

func (Services) AddHeaders added in v0.4.3

func (s Services) AddHeaders(headers Headers)

func (Services) AddPathPrefixs added in v0.4.3

func (s Services) AddPathPrefixs(path_prefixs ...string)

func (Services) Log added in v0.4.3

func (s Services) Log()

func (Services) SendObj added in v0.4.3

func (s Services) SendObj(action string, body_obj any)

default action is "obj"

Jump to

Keyboard shortcuts

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