reader

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package reader implement template readers.

Index

Constants

View Source
const ErrTemplateNotFound = errors.Error("template not found")

ErrTemplateNotFound is returned when the requested template does not exist.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileReader

type FileReader struct {
	// contains filtered or unexported fields
}

FileReader is a local file reader.

func NewFileReader

func NewFileReader(path string, tracer trace.Tracer) *FileReader

NewFileReader returns a file reader.

func (*FileReader) Read

func (r *FileReader) Read(ctx context.Context, path string) (string, error)

Read reads the file at the given path.

type HTTPReader

type HTTPReader struct {
	// contains filtered or unexported fields
}

HTTPReader is an http file reader.

func NewHTTPReader

func NewHTTPReader(uri string, tracer trace.Tracer) (*HTTPReader, error)

NewHTTPReader returns an http file reader.

func (*HTTPReader) Read

func (r *HTTPReader) Read(ctx context.Context, path string) (string, error)

Read reads the file at the given path.

Jump to

Keyboard shortcuts

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