all repos — homestead @ 2edd98046639d440b7a5a191c1bec2d338f1c7cf

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
	Headers      map[string]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
}