repo

package
v0.0.0-...-353bbc6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: GPL-3.0 Imports: 24 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotReady     = errors.New("Repository not ready")
	ErrFileNotFound = object.ErrFileNotFound
)
View Source
var (
	ErrExists      = errors.New("existing id")
	ErrNotFound    = errors.New("not found")
	ErrHasChildren = errors.New("element has children")
	ErrLanguage    = errors.New("invalid language")
)

Functions

func RandStringBytesMaskImprSrc

func RandStringBytesMaskImprSrc(n int) string

Types

type Repo

type Repo struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func Local

func Local(dir, branch string) (*Repo, error)

func New

func New(owner, name, branch string) (*Repo, error)

func (*Repo) All

func (r *Repo) All(locale string) []component.Component

func (*Repo) Asset

func (r *Repo) Asset(id string) *component.Asset

func (*Repo) Categories

func (r *Repo) Categories(locale string) []string

func (*Repo) Category

func (r *Repo) Category(cat, locale string) *component.Category

func (*Repo) ComponentHash

func (r *Repo) ComponentHash(c component.Component) (string, error)

func (*Repo) Create

func (r *Repo) Create(c component.Component, u models.User, token string) error

func (*Repo) Delete

func (r *Repo) Delete(c component.Component, u models.User, token string) error

func (*Repo) Form

func (r *Repo) Form(id string, locale string) *component.Form

func (*Repo) Forms

func (r *Repo) Forms(locale string) []string

func (*Repo) Get

func (r *Repo) Get(c component.Component) (string, error)

func (*Repo) Handler

func (r *Repo) Handler() RepoHandler

func (*Repo) Locale

func (r *Repo) Locale() []string

func (*Repo) MarshalJSON

func (r *Repo) MarshalJSON() ([]byte, error)

func (*Repo) Pull

func (r *Repo) Pull()

func (*Repo) SetConf

func (r *Repo) SetConf(c *oauth2.Config)

func (*Repo) String

func (r *Repo) String() string

func (*Repo) Tree

func (r *Repo) Tree(locale string, html bool) interface{}

func (*Repo) Update

func (r *Repo) Update(c component.Component, u models.User, token string) error

type RepoHandler

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

func (*RepoHandler) AssetCreate

func (r *RepoHandler) AssetCreate(c *gin.Context)

func (*RepoHandler) AssetShow

func (r *RepoHandler) AssetShow(c *gin.Context)

func (*RepoHandler) CanDelete

func (r *RepoHandler) CanDelete(c *gin.Context)

func (*RepoHandler) Create

func (r *RepoHandler) Create(c *gin.Context)

func (*RepoHandler) Delete

func (r *RepoHandler) Delete(c *gin.Context)

func (*RepoHandler) Info

func (r *RepoHandler) Info(c *gin.Context)

func (*RepoHandler) IsNew

func (r *RepoHandler) IsNew(c *gin.Context)

func (*RepoHandler) ParseAsset

func (r *RepoHandler) ParseAsset(c *gin.Context)

func (*RepoHandler) ParseCat

func (r *RepoHandler) ParseCat(c *gin.Context)

func (*RepoHandler) ParseCheck

func (r *RepoHandler) ParseCheck(c *gin.Context)

func (*RepoHandler) ParseDiff

func (r *RepoHandler) ParseDiff(c *gin.Context)

func (*RepoHandler) ParseForm

func (r *RepoHandler) ParseForm(c *gin.Context)

func (*RepoHandler) ParseItem

func (r *RepoHandler) ParseItem(c *gin.Context)

func (*RepoHandler) ParseLocale

func (r *RepoHandler) ParseLocale(c *gin.Context)

func (*RepoHandler) ParseSub

func (r *RepoHandler) ParseSub(c *gin.Context)

func (*RepoHandler) Root

func (r *RepoHandler) Root(c *gin.Context)

func (*RepoHandler) SetAsset

func (r *RepoHandler) SetAsset(c *gin.Context)

func (*RepoHandler) SetCat

func (r *RepoHandler) SetCat(c *gin.Context)

SetCat loads the category using the url parameter

func (*RepoHandler) SetCheck

func (r *RepoHandler) SetCheck(c *gin.Context)

func (*RepoHandler) SetDiff

func (r *RepoHandler) SetDiff(c *gin.Context)

func (*RepoHandler) SetForm

func (r *RepoHandler) SetForm(c *gin.Context)

SetForm loads the form using the url parameter

func (*RepoHandler) SetItem

func (r *RepoHandler) SetItem(c *gin.Context)

func (*RepoHandler) SetSub

func (r *RepoHandler) SetSub(c *gin.Context)

func (*RepoHandler) Show

func (r *RepoHandler) Show(c *gin.Context)

func (*RepoHandler) ShowChecks

func (r *RepoHandler) ShowChecks(c *gin.Context)

func (*RepoHandler) Tree

func (r *RepoHandler) Tree(c *gin.Context)

func (*RepoHandler) Update

func (r *RepoHandler) Update(c *gin.Context)

func (*RepoHandler) UpdateChecks

func (r *RepoHandler) UpdateChecks(c *gin.Context)

Jump to

Keyboard shortcuts

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