Documentation

Overview

    Package model is a model abstraction of mirror data structures.

    Index

    Constants

    View Source
    const (
    	TimestampRW = "[timestamp]"
    	UUID        = "[uuid]"
    
    	// Test is used for testing only.
    	Test = "[test]"
    )

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Mirror

    type Mirror struct {
    	ID int64
    	// Read from
    	IndexFile  string
    	ExportRoot string
    	// Write to
    	CloudStorageBucket string
    	FilenameRoot       string
    	// Rewrite rules
    	FilenameRewrite *string
    	// contains filtered or unexported fields
    }

      Mirror represents an individual mirror configuration.

      func (*Mirror) NeedsRewrite

      func (m *Mirror) NeedsRewrite() bool

      func (*Mirror) RewriteFilename

      func (m *Mirror) RewriteFilename(fName string) (string, error)

      type MirrorFile

      type MirrorFile struct {
      	MirrorID      int64
      	Filename      string
      	LocalFilename *string
      }

        MirrorFile represents a file that we believe to be in the remote index.txt and is mirrored to our CDN.

        Source Files