artscollection

package module
v0.0.0-...-ba60b02 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2017 License: MIT Imports: 1 Imported by: 0

README

artscollection

A flexbile way to store and read data

Configuration

Program

The configuration is all inside the .artscollection.yaml file.

The structure of the configuration looks like:

author: authorGithub
serverPort: :8081
collections:
        myCollection: path/to/collection
        anotherCollection: path/to/collection
Collection

Inside of every collection there are also individual configuration possibilities. In the root folder of the collection a conf.yaml file is needed. This file defines all the default fields for the collection.

If there is a field with the key title that value is used inside the navigation. Otherwise the folder name is used as title.

-  key: title
    name: Name
    type: string
    render: 
    group: a
    order: 10
-  key: desc
    name: Description
    type: string
    render: textarea
    group: a
    order: 20 

Following types are allowed:

  • string
  • int
  • bool
  • list

The string type supports the render property. If render: textarea the input field is rendered as a textarea.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adder

type Adder interface {
	Add(storage.Storager) error
}

type Collection

type Collection struct {
	Artworks    []storage.Storager
	Title       string
	Description string
	DataFields  []storage.Field
}

type Item

type Item interface {
	Filepath() string
	GetStorage() storage.Storager
}

type Loader

type Loader interface {
	Load() *Collection
}

type Remover

type Remover interface {
	Remove(storage.Storager)
}

type Updater

type Updater interface {
	Update(storage.Storager) error
}

Directories

Path Synopsis
cmd
Package storage defines the API over interfaces, which are needed to store data.
Package storage defines the API over interfaces, which are needed to store data.

Jump to

Keyboard shortcuts

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