models

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Lockfile        Lockfile
	LocalAuthHeader string
	HttpClient      http.Client
	Entitlements    Entitlements
	ConfigManager   ConfigManager
}

func NewClient

func NewClient() *Client

func (*Client) GetCurrentAccountSettings

func (c *Client) GetCurrentAccountSettings() Config

func (Client) GetGlobalHeader

func (c Client) GetGlobalHeader() map[string]string

func (Client) GetLocalHeader

func (c Client) GetLocalHeader() map[string]string

func (Client) PushConfigToServer

func (c Client) PushConfigToServer(idx int)

func (*Client) ReadLockfile

func (c *Client) ReadLockfile()

func (*Client) SetupEntitlements

func (c *Client) SetupEntitlements()

func (*Client) SetupHttpClient

func (c *Client) SetupHttpClient()

func (*Client) SetupLocalHeader

func (c *Client) SetupLocalHeader()

type Config

type Config struct {
	Type     string `json:"type"`
	Data     string `json:"data"`
	Modified int    `json:"modified"`
	Filename string `json:"-"`
}

func (Config) WriteConfigToFile

func (cfg_file Config) WriteConfigToFile()

type ConfigManager

type ConfigManager struct {
	Configs []Config
}

func (*ConfigManager) LoadAllConfigurationFiles

func (cm *ConfigManager) LoadAllConfigurationFiles()

type Entitlements

type Entitlements struct {
	AccessToken string `json:"accessToken"`
	Subject     string `json:"subject"`
	Token       string `json:"token"`
}

type Lockfile

type Lockfile struct {
	Name     string
	PID      string
	Port     string
	Password string
	Protocol string
}

Jump to

Keyboard shortcuts

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