luci: Index | Files

package usercontent

import ""

Package usercontent can serve user content via plain HTTP securely.


Package Files

doc.go isolate.go server.go signing.go

type Server Uses

type Server struct {
    // Use http:// (not https://) for generated URLs.
    InsecureURLs bool

    // Included in generated signed URLs and required in content requests.
    Hostname string
    // contains filtered or unexported fields

Server can serve user content, and generate signed content URLs to the content.

func NewServer Uses

func NewServer(ctx context.Context, insecureURLs bool, hostname string) (*Server, error)

NewServer creates a Server.

func (*Server) GenerateSignedIsolateURL Uses

func (s *Server) GenerateSignedIsolateURL(ctx context.Context, isolateHost, ns, digest string) (u *url.URL, expiration time.Time, err error)

GenerateSignedIsolateURL returns a signed 1h-lived URL at which the content of the given isolated file can be fetched via plain HTTP.

func (*Server) InstallHandlers Uses

func (s *Server) InstallHandlers(r *router.Router)

InstallHandlers installs handlers to serve user content.

Package usercontent imports 17 packages (graph) and is imported by 2 packages. Updated 2020-03-30. Refresh now. Tools for package owners.