models

package
v0.0.0-...-93522cb Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2017 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPakreq

func AddPakreq(pakreq Pakreq) bool

AddPakreq adds a pakreq to the whole array

func ExportToFile

func ExportToFile()

ExportToFile exports all current pakreqs and udpates to a config.toml

func IsPakreq

func IsPakreq(text string) bool

IsPakreq returns true if the string is a valid pakreq

func IsSecurity

func IsSecurity(text string) bool

IsSecurity returns if it's a update

func IsURL

func IsURL(text string) bool

IsURL use a very efficient way to judge if it is a URL ;)

func IsUpdate

func IsUpdate(text string) bool

IsUpdate returns if it's a update

func PakreqExists

func PakreqExists(pakreq Pakreq) bool

PakreqExists returns if the pakreq already exists in the database

func PakreqToArray

func PakreqToArray(text string) []string

PakreqToArray returns a slice of string containing package names

func ReadFromFile

func ReadFromFile()

ReadFromFile reads config from config.toml

Types

type Config

type Config struct {
	TgBotKey      string
	GhToken       string
	Version       string
	RepoURL       string
	MembersID     []string
	CurPakreqs    []Pakreq
	CurUpdates    []Update
	ClosedPakreqs []Pakreq
	ClosedUpdates []Update
}

Config struct, stores in file

var CurConfig Config

CurConfig Current Config

type Pakreq

type Pakreq struct {
	PkgName   string
	PkgURL    string
	PkgDesc   string
	Author    string
	IssueURL  string
	OpenTime  time.Time
	CloseTime time.Time
}

Pakreq stores a #pakreq

type Security

type Security struct {
	PkgName   string
	Author    string
	ToVersion string
	OpenTime  time.Time
	CloseTime time.Time
}

Security stores packages that need to be updated

type Update

type Update struct {
	PkgName   string
	Author    string
	ToVersion string
	OpenTime  time.Time
	CloseTime time.Time
}

Update stores packages that need to be updated

Jump to

Keyboard shortcuts

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