config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default addresses
	DefaultBindAddress = "0.0.0.0"
	LocalhostIP        = "127.0.0.1"

	// Port configuration
	GRPCPort    = "31007"
	GRPCWebPort = "31008"
	APIPort     = "31009"

	// Full addresses
	DefaultGRPCAddress    = LocalhostIP + ":" + GRPCPort
	DefaultGRPCWebAddress = LocalhostIP + ":" + GRPCWebPort
	DefaultAPIAddress     = DefaultBindAddress + ":" + APIPort

	// URLs
	GRPCDNSAddress = "dns:///" + DefaultGRPCAddress

	// External URLs
	GitHubBaseURL    = "https://github.com/anyproto/anytype-cli"
	GitHubCommitURL  = GitHubBaseURL + "/commit/"
	GitHubReleaseURL = GitHubBaseURL + "/releases/tag/"

	// Anytype network address
	AnytypeNetworkAddress = "N83gJpVd9MuNRZAuJLZ7LiMntTThhPc6DtzWWVjb1M3PouVU"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AccountId   string `json:"accountId,omitempty"`
	TechSpaceId string `json:"techSpaceId,omitempty"`
}

type ConfigManager

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

func GetConfigManager

func GetConfigManager() *ConfigManager

func (*ConfigManager) Delete

func (cm *ConfigManager) Delete() error

func (*ConfigManager) Get

func (cm *ConfigManager) Get() *Config

func (*ConfigManager) Load

func (cm *ConfigManager) Load() error

func (*ConfigManager) Reset

func (cm *ConfigManager) Reset() error

func (*ConfigManager) Save

func (cm *ConfigManager) Save() error

func (*ConfigManager) SetAccountId

func (cm *ConfigManager) SetAccountId(accountId string) error

func (*ConfigManager) SetTechSpaceId

func (cm *ConfigManager) SetTechSpaceId(techSpaceId string) error

Jump to

Keyboard shortcuts

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