buf: github.com/bufbuild/buf/internal/buf/bufcore Index | Files | Directories

package bufcore

import "github.com/bufbuild/buf/internal/buf/bufcore"

Package bufcore contains core types.

Index

Package Files

bufcore.go file_info.go

type FileInfo Uses

type FileInfo interface {
    // Path is the path of the file relative to the root it is contained within.
    // This will be normalized, validated and never empty,
    // This will be unique within a given Image.
    Path() string

    //   Path: one/one.proto
    //   RootDirPath: proto
    //   ExternalPath: /foo/bar/proto/one/one.proto
    ExternalPath() string
    // IsImport returns true if this file is an import.
    IsImport() bool

    // WithIsImport returns this FileInfo with the given IsImport value.
    WithIsImport(isImport bool) FileInfo
    // contains filtered or unexported methods
}

FileInfo contains protobuf file info.

func NewFileInfo Uses

func NewFileInfo(path string, externalPath string, isImport bool) (FileInfo, error)

NewFileInfo returns a new FileInfo.

If externalPath is empty, path is used.

func NewFileInfoForObjectInfo Uses

func NewFileInfoForObjectInfo(objectInfo storage.ObjectInfo, isImport bool) FileInfo

NewFileInfoForObjectInfo returns a new FileInfo for the storage.ObjectInfo.

The same rules apply to ObjectInfos for paths as FileInfos so we do not need to validate.

Directories

PathSynopsis
bufcoretesting
bufcoreutil
bufimage
bufimage/bufimagebuild
bufimage/bufimagebuild/bufimagebuildtesting
bufimage/bufimagetesting
bufimage/bufimageutil
bufmodule
bufmodule/bufmodulebuild
bufmodule/bufmodulecache
bufmodule/bufmodulestorage
bufmodule/bufmoduletesting
internal

Package bufcore imports 2 packages (graph) and is imported by 10 packages. Updated 2020-10-20. Refresh now. Tools for package owners.