csv

package
v1.1.53 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDeprecatedCategoryCsv = errors.New("category csv kadaluarsa silahkan generate ulang")
View Source
var ErrNoCategories = errors.New("no categories")

Functions

func LoadKeyword

func LoadKeyword(fname string) ([]string, error)

func SaveCategoryCsv

func SaveCategoryCsv(base BaseConfig, categories []*CategoryCsv) error

func SaveKeyword

func SaveKeyword(fname string, keywords []string) error

Types

type BaseConfig added in v1.1.12

type BaseConfig interface {
	Path(...string) string
}

type CategoryCsv

type CategoryCsv struct {
	Type   string                `csv:"type" json:"type"`
	Cat1   string                `csv:"cat_1" json:"cat_1"`
	Cat2   string                `csv:"cat_2" json:"cat_2"`
	Cat3   string                `csv:"cat_3" json:"cat_3"`
	Url    string                `csv:"url" json:"url"`
	Status StatusGrabCategoryCsv `csv:"status" json:"status"`
}

func LoadCategoryCsv

func LoadCategoryCsv(base BaseConfig) ([]*CategoryCsv, error)

func NewCategoryCsv added in v1.1.12

func NewCategoryCsv(categories []*model_public.Categories) (*CategoryCsv, error)

func (*CategoryCsv) GetName added in v1.1.29

func (c *CategoryCsv) GetName() string

type StatusGrabCategoryCsv

type StatusGrabCategoryCsv string
const (
	STATUS_GRAB_CATEGORY_GRABBED   StatusGrabCategoryCsv = "grabbed"
	STATUS_GRAB_CATEGORY_UNGRABBED StatusGrabCategoryCsv = ""
)

Jump to

Keyboard shortcuts

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