file

package
v0.0.0-...-5a209be Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotRegularFile = errors.New("only regular files are supported")
View Source
var MaxReadSize = 128 * units.Megabyte
View Source
var UnknownASN1Data = Info{Description: "unknown ASN.1 data"}
View Source
var UnknownPEMData = Info{Description: "unknown PEM data"}

Functions

func IsASN1

func IsASN1(_ string, data []byte, fileSize int64) bool

Types

type Attribute

type Attribute struct {
	Name  string
	Value string
}

type Identifier

type Identifier func(name string, data []byte, fileSize int64) bool

type Info

type Info struct {
	Path        string
	Size        int64
	Description string
	Attributes  []Attribute
	Children    []Info
}

func ASN1File

func ASN1File(info Info, data []byte) (Info, error)

func Inspect

func Inspect(f *os.File) (Info, error)

func JCEKeystore

func JCEKeystore(info Info, _ []byte) (Info, error)

func JavaKeystore

func JavaKeystore(info Info, _ []byte) (Info, error)

func PEMFile

func PEMFile(info Info, data []byte) (Info, error)

func PGPPrivateKey

func PGPPrivateKey(info Info, data []byte) (Info, error)

func PGPPublicKey

func PGPPublicKey(info Info, data []byte) (Info, error)

func PuttyPPK

func PuttyPPK(info Info, data []byte) (Info, error)

func SSH1PrivateKey

func SSH1PrivateKey(info Info, data []byte) (Info, error)

func SSHAuthorizedKeys

func SSHAuthorizedKeys(info Info, data []byte) (Info, error)

func SSHKnownHosts

func SSHKnownHosts(info Info, data []byte) (Info, error)

func SSHPublicKey

func SSHPublicKey(info Info, data []byte) (Info, error)

type Parser

type Parser func(info Info, data []byte) (Info, error)

Jump to

Keyboard shortcuts

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