chadmin

package
v0.0.0-...-72a0dfd Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminClient

type AdminClient struct {
	*cio.Logger
	// contains filtered or unexported fields
}

Admin represents an admin api client instance

func NewAdminClient

func NewAdminClient(c *Config) (*AdminClient, error)

NewAdminClient creates a new admin client instance

func (*AdminClient) AddUser

func (c *AdminClient) AddUser(args []string)

func (*AdminClient) DelUser

func (c *AdminClient) DelUser(args []string)

func (*AdminClient) GerUser

func (c *AdminClient) GerUser(args []string)

func (*AdminClient) ListUsers

func (c *AdminClient) ListUsers(args []string)

type Config

type Config struct {
	//ProfilePath      string
	Fingerprint      string        `yaml:"fingerprint,omitempty"`
	Auth             string        `yaml:"auth,omitempty"`
	Username         string        `yaml:"username,omitempty"`
	Password         string        `yaml:"password,omitempty"`
	MaxRetryCount    int           `yaml:"max-retry-count,omitempty"`
	MaxRetryInterval time.Duration `yaml:"max-retry-interval,omitempty"`
	Server           string        `yaml:"server,omitempty"`
	Proxy            string        `yaml:"proxy,omitempty"`
	Headers          http.Header   `yaml:"headers,omitempty"`
	TLS              TLSConfig     `yaml:"tls,omitempty"`
	Verbose          bool          `yaml:"verbose,omitempty"`
}

Config represents a client configuration

func NewClientConfig

func NewClientConfig(profileConfigPath string, cfg *Config) (*Config, error)

type RegexList

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

func (*RegexList) Set

func (r *RegexList) Set(value string) error

Set parses and sets the regex expressions from a comma-separated string.

func (*RegexList) String

func (r *RegexList) String() string

String returns the string representation of the RegexList.

type TLSConfig

type TLSConfig struct {
	SkipVerify bool   `yaml:"tls-skip-verify,omitempty"`
	CA         string `yaml:"tls-ca,omitempty"`
	Cert       string `yaml:"tls-cert,omitempty"`
	Key        string `yaml:"tls-key,omitempty"`
	ServerName string `yaml:"hostname,omitempty"`
}

TLSConfig for a Client

Jump to

Keyboard shortcuts

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