fileservice

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileService

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

func New

func New(cfg *config.Config) (*FileService, error)

func (*FileService) Clean

func (s *FileService) Clean()

func (*FileService) Config

func (s *FileService) Config() *config.Config

func (*FileService) DeleteByAge

func (s *FileService) DeleteByAge() error

func (*FileService) DeleteBySize

func (s *FileService) DeleteBySize() error

func (*FileService) GetUsedBytes

func (s *FileService) GetUsedBytes(subpath string) (int, error)

func (*FileService) GetUsedBytesFromDisk

func (s *FileService) GetUsedBytesFromDisk(path string) (int, error)

func (*FileService) GetUsedBytesFromFiles

func (s *FileService) GetUsedBytesFromFiles(subpath string) (int, error)

func (*FileService) List

func (s *FileService) List(subpath string) ([]string, error)

func (*FileService) ListFiles

func (s *FileService) ListFiles() ([]LogFile, error)

func (*FileService) ListLogDirs

func (s *FileService) ListLogDirs() []LogDir

func (*FileService) ListLogDirsWithSize

func (s *FileService) ListLogDirsWithSize() []LogDir

func (*FileService) ListTargets

func (s *FileService) ListTargets() []LogDir

func (*FileService) Scanner

func (s *FileService) Scanner(subpath string) (*bufio.Scanner, error)

type LogDir

type LogDir struct {
	Fullpath    string
	Subpath     string
	LogType     string
	Target      string
	FileCount   int
	FirstFile   string
	LastFile    string
	Size        int64
	LastForward string
}

type LogFile

type LogFile struct {
	Fullpath  string
	Subpath   string
	LogType   string
	Target    string
	Name      string
	Extension string
	Size      int64
}

LogFile

Jump to

Keyboard shortcuts

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