storage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bucket  = "CLASH_CLI"
	Mode    = "CLASH_CLI_MODE"
	Proxies = "CLASH_CLI_PROXIES"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func Open

func Open() (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) GetMode

func (c *Client) GetMode() (tunnel.Mode, error)

func (*Client) GetProxies

func (c *Client) GetProxies() (map[string]string, error)

func (*Client) SaveMode

func (c *Client) SaveMode(mode tunnel.Mode) error

func (*Client) UpdateProxy

func (c *Client) UpdateProxy(group, proxy string) error

type IStorage

type IStorage interface {
	SaveMode(tunnel.Mode) error
	GetMode() (tunnel.Mode, error)
	Close()
	UpdateProxy(group, proxy string) error
	GetProxies() (map[string]string, error)
}

Jump to

Keyboard shortcuts

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