Documentation ¶
Index ¶
- Constants
- type AudioEntity
- type Entity
- type ImageEntity
- type Moment
- type Shelf
- func (shelf *Shelf) AddImageEntity(mimeType string, buffer []byte) (*ImageEntity, error)
- func (shelf *Shelf) AddVideoEntity(mimeType string, r io.Reader) (*VideoEntity, error)
- func (shelf *Shelf) FindAllEntities() []Entity
- func (shelf *Shelf) FindAllEntitiesByYear(year int) []Entity
- func (shelf *Shelf) FindAllMoments() []*Moment
- func (shelf *Shelf) FindAllMomentsByYear(year int) []*Moment
- func (shelf *Shelf) Init() error
- func (shelf *Shelf) LookupEntity(id string) Entity
- func (shelf *Shelf) LookupMoment(path string) *Moment
- func (shelf *Shelf) NumEntities() int
- func (shelf *Shelf) NumMoments() int
- func (shelf *Shelf) RemoveEntity(entity Entity) error
- func (shelf *Shelf) SaveMoment(origTime time.Time, m *Moment) error
- type Storage
- func (s *Storage) CreateFile(path string) (*os.File, error)
- func (s *Storage) Exists(path string) bool
- func (s *Storage) Mkdir(path string) error
- func (s *Storage) OpenFile(path string) (*os.File, error)
- func (s *Storage) OpenTempFile(ext string) (string, *os.File, error)
- func (s *Storage) ReadFile(path string) ([]byte, error)
- func (s *Storage) Remove(path string) error
- func (s *Storage) Rename(old, new string) error
- func (s *Storage) RenameFileWithBytes(old, new string, content []byte) error
- func (s *Storage) UpdateFileWithBytes(path string, content []byte) error
- func (s *Storage) UpdateFileWithReader(path string, reader io.Reader) error
- func (s *Storage) UpdateFileWithTempFile(path string, tmpFile *os.File) error
- func (s *Storage) WalkFiles(path string, fn func(path string, info os.FileInfo, err error) error) error
- func (s *Storage) WriteFile(path string, content []byte) error
- type VideoEntity
Constants ¶
View Source
const EntityPath = "entity"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioEntity ¶
type AudioEntity struct {
// contains filtered or unexported fields
}
func (*AudioEntity) Description ¶
func (e *AudioEntity) Description() string
func (*AudioEntity) SystemPath ¶
func (e *AudioEntity) SystemPath() string
type ImageEntity ¶
type ImageEntity struct { Width int `yaml:"width"` Height int `yaml:"height"` // contains filtered or unexported fields }
func (*ImageEntity) Description ¶
func (e *ImageEntity) Description() string
func (*ImageEntity) SystemPath ¶
func (e *ImageEntity) SystemPath() string
type Moment ¶
type Moment struct { Date time.Time `yaml:"date"` Title string `yaml:"title"` Author string `yaml:"author"` Text string `yaml:"text"` }
func (*Moment) DateString ¶
type Shelf ¶
type Shelf struct {
// contains filtered or unexported fields
}
季節の書架
func (*Shelf) AddImageEntity ¶
func (shelf *Shelf) AddImageEntity(mimeType string, buffer []byte) (*ImageEntity, error)
func (*Shelf) AddVideoEntity ¶
func (*Shelf) FindAllEntities ¶
func (*Shelf) FindAllEntitiesByYear ¶
func (*Shelf) FindAllMoments ¶
func (*Shelf) FindAllMomentsByYear ¶
func (*Shelf) LookupEntity ¶
func (*Shelf) LookupMoment ¶
func (*Shelf) NumEntities ¶
func (*Shelf) NumMoments ¶
func (*Shelf) RemoveEntity ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Storage) RenameFileWithBytes ¶
func (*Storage) UpdateFileWithBytes ¶
func (*Storage) UpdateFileWithReader ¶
func (*Storage) UpdateFileWithTempFile ¶
type VideoEntity ¶
type VideoEntity struct { Width int `yaml:"width"` Height int `yaml:"height"` Duration float64 `yaml:"duraton"` // contains filtered or unexported fields }
func (*VideoEntity) Description ¶
func (e *VideoEntity) Description() string
func (*VideoEntity) SystemPath ¶
func (e *VideoEntity) SystemPath() string
Click to show internal directories.
Click to hide internal directories.