config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config provides functions for loading and saving the user's configuration.

Package config is a generated protocol buffer package.

It is generated from these files:

config.proto

It has these top-level messages:

Config
Stock

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(cfg *Config) error

Save saves the user's config to disk.

Types

type Config

type Config struct {
	CurrentStock *Stock   `protobuf:"bytes,1,opt,name=current_stock,json=currentStock" json:"current_stock,omitempty"`
	Stocks       []*Stock `protobuf:"bytes,2,rep,name=stocks" json:"stocks,omitempty"`
}

func Load

func Load() (*Config, error)

Load loads the user's config from disk.

func (*Config) Descriptor

func (*Config) Descriptor() ([]byte, []int)

func (*Config) GetCurrentStock

func (m *Config) GetCurrentStock() *Stock

func (*Config) GetStocks

func (m *Config) GetStocks() []*Stock

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

type Stock

type Stock struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol" json:"symbol,omitempty"`
}

func (*Stock) Descriptor

func (*Stock) Descriptor() ([]byte, []int)

func (*Stock) GetSymbol

func (m *Stock) GetSymbol() string

func (*Stock) ProtoMessage

func (*Stock) ProtoMessage()

func (*Stock) Reset

func (m *Stock) Reset()

func (*Stock) String

func (m *Stock) String() string

Jump to

Keyboard shortcuts

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