all repos — homestead @ a0bb10d9dea0d560a0ca4ccc7d9d4bf3848242e7

Code for my website

shared/storage/file.go (view raw)

package storage

import (
	"time"

	"alin.ovh/homestead/shared/buffer"
)

type File struct {
	Path         string
	FSPath       string
	ContentType  string
	LastModified time.Time
	Etag         string
	Title        string
	Encodings    map[string]*buffer.Buffer
}

func (f *File) AvailableEncodings() []string {
	encs := make([]string, 0, len(f.Encodings))
	for enc := range f.Encodings {
		encs = append(encs, enc)
	}

	return encs
}