package ui import "io" // Resources is an abstraction for opening resources. type Resources interface { // OpenResource should open the resource with the specified name. The user is responsible for closing the resource. OpenResource(name string) (io.ReadCloser, error) // Destroy can be used for cleaning up at the end of the applications lifetime. Destroy() error } // PhysicalResources is an abstraction for opening and fetching (to disk) resources. type PhysicalResources interface { Resources // FetchResource should fetch the resource with the specified name and return a path (on disk) where the resource can be accessed. FetchResource(name string) (string, error) }