Documentation
¶
Index ¶
- Variables
- func GetVersion() string
- type Config
- type ConfigReader
- func (r *ConfigReader) CheckUpdate() (bool, error)
- func (r *ConfigReader) PrintModelMenu(title string, models []string, modelGroup []config.ModelGroup)
- func (r *ConfigReader) ReadLinkConfig() (*Config, error)
- func (r *ConfigReader) ReadValidTestConfig() (*Config, error)
- func (r *ConfigReader) ShowConfig(cfg *Config)
- type GithubRelease
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyLatest = fmt.Errorf("already latest version")
ErrAlreadyLatest indicates the current version is already the latest
View Source
var Version = "dev"
Version information
Functions ¶
func GetVersion ¶ added in v0.2.1
func GetVersion() string
GetVersion returns the version with "v" prefix if not already present
Types ¶
type Config ¶
type Config struct { Keys []string LinkTestModel string ValidTestModel []string Type types.ChannelType URL string ImageURL string }
Config represents API configuration
type ConfigReader ¶
ConfigReader handles the configuration reading process
func NewConfigReader ¶
func NewConfigReader(input io.Reader, output io.Writer) *ConfigReader
NewConfigReader creates a new ConfigReader
func (*ConfigReader) CheckUpdate ¶
func (r *ConfigReader) CheckUpdate() (bool, error)
CheckUpdate checks for updates and prompts the user to update if a new version is available
func (*ConfigReader) PrintModelMenu ¶
func (r *ConfigReader) PrintModelMenu(title string, models []string, modelGroup []config.ModelGroup)
func (*ConfigReader) ReadLinkConfig ¶
func (r *ConfigReader) ReadLinkConfig() (*Config, error)
ReadLinkConfig reads configuration for link detection
func (*ConfigReader) ReadValidTestConfig ¶
func (r *ConfigReader) ReadValidTestConfig() (*Config, error)
ReadConfig reads API configuration from user input
func (*ConfigReader) ShowConfig ¶
func (r *ConfigReader) ShowConfig(cfg *Config)
ShowConfig displays the configuration information
type GithubRelease ¶
type GithubRelease struct {
TagName string `json:"tag_name"`
}
Click to show internal directories.
Click to hide internal directories.