model

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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 added in v0.16.1

func (m *Mirror) NeedsRewrite() bool

func (*Mirror) RewriteFilename added in v0.16.1

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL