pb

package
v0.0.0-...-fe84549 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MountState_name = map[int32]string{
		0: "Unknown",
		1: "Requested",
		2: "Mounted",
		3: "MountError",
		4: "UnmountRequested",
		5: "Unmounted",
		6: "Deleted",
	}
	MountState_value = map[string]int32{
		"Unknown":          0,
		"Requested":        1,
		"Mounted":          2,
		"MountError":       3,
		"UnmountRequested": 4,
		"Unmounted":        5,
		"Deleted":          6,
	}
)

Enum value maps for MountState.

View Source
var (
	EntryType_name = map[int32]string{
		0: "UNKNOWN",
		1: "REGULAR",
		2: "DIRECTORY",
		3: "SYMLINK",
	}
	EntryType_value = map[string]int32{
		"UNKNOWN":   0,
		"REGULAR":   1,
		"DIRECTORY": 2,
		"SYMLINK":   3,
	}
)

Enum value maps for EntryType.

View Source
var File_entry_proto protoreflect.FileDescriptor
View Source
var File_manifest_proto protoreflect.FileDescriptor
View Source
var File_narinfo_proto protoreflect.FileDescriptor
View Source
var File_params_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DaemonParams

type DaemonParams struct {
	Params *GlobalParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	// URL for manifester service, chunk reads, and chunk diffs.
	ManifesterUrl    string `protobuf:"bytes,2,opt,name=manifester_url,json=manifesterUrl,proto3" json:"manifester_url,omitempty"`
	ManifestCacheUrl string `protobuf:"bytes,5,opt,name=manifest_cache_url,json=manifestCacheUrl,proto3" json:"manifest_cache_url,omitempty"`
	ChunkReadUrl     string `protobuf:"bytes,3,opt,name=chunk_read_url,json=chunkReadUrl,proto3" json:"chunk_read_url,omitempty"`
	ChunkDiffUrl     string `protobuf:"bytes,4,opt,name=chunk_diff_url,json=chunkDiffUrl,proto3" json:"chunk_diff_url,omitempty"`
	// Size to shard manifest. If missing, daemon uses a default.
	ShardManifestBytes int64 `protobuf:"varint,6,opt,name=shard_manifest_bytes,json=shardManifestBytes,proto3" json:"shard_manifest_bytes,omitempty"`
	// contains filtered or unexported fields
}

Parameters that can be used to configure a styx daemon.

func (*DaemonParams) Descriptor deprecated

func (*DaemonParams) Descriptor() ([]byte, []int)

Deprecated: Use DaemonParams.ProtoReflect.Descriptor instead.

func (*DaemonParams) GetChunkDiffUrl

func (x *DaemonParams) GetChunkDiffUrl() string

func (*DaemonParams) GetChunkReadUrl

func (x *DaemonParams) GetChunkReadUrl() string

func (*DaemonParams) GetManifestCacheUrl

func (x *DaemonParams) GetManifestCacheUrl() string

func (*DaemonParams) GetManifesterUrl

func (x *DaemonParams) GetManifesterUrl() string

func (*DaemonParams) GetParams

func (x *DaemonParams) GetParams() *GlobalParams

func (*DaemonParams) GetShardManifestBytes

func (x *DaemonParams) GetShardManifestBytes() int64

func (*DaemonParams) ProtoMessage

func (*DaemonParams) ProtoMessage()

func (*DaemonParams) ProtoReflect

func (x *DaemonParams) ProtoReflect() protoreflect.Message

func (*DaemonParams) Reset

func (x *DaemonParams) Reset()

func (*DaemonParams) String

func (x *DaemonParams) String() string

type DbImage

type DbImage struct {

	// full store path including name
	StorePath string `protobuf:"bytes,2,opt,name=store_path,json=storePath,proto3" json:"store_path,omitempty"`
	// which upstream this was from
	Upstream string `protobuf:"bytes,3,opt,name=upstream,proto3" json:"upstream,omitempty"`
	// system id from syschecker
	SyscheckerSystem int64 `protobuf:"varint,4,opt,name=syschecker_system,json=syscheckerSystem,proto3" json:"syschecker_system,omitempty"`
	// is it mounted and where?
	MountState     MountState `protobuf:"varint,5,opt,name=mount_state,json=mountState,proto3,enum=pb.MountState" json:"mount_state,omitempty"`
	MountPoint     string     `protobuf:"bytes,6,opt,name=mount_point,json=mountPoint,proto3" json:"mount_point,omitempty"`
	LastMountError string     `protobuf:"bytes,7,opt,name=last_mount_error,json=lastMountError,proto3" json:"last_mount_error,omitempty"`
	// size of erofs image
	ImageSize int64 `protobuf:"varint,1,opt,name=image_size,json=imageSize,proto3" json:"image_size,omitempty"`
	IsBare    bool  `protobuf:"varint,10,opt,name=is_bare,json=isBare,proto3" json:"is_bare,omitempty"`
	// contains filtered or unexported fields
}

key: "image" / <store path hash (nix base32)> value:

func (*DbImage) Descriptor deprecated

func (*DbImage) Descriptor() ([]byte, []int)

Deprecated: Use DbImage.ProtoReflect.Descriptor instead.

func (*DbImage) GetImageSize

func (x *DbImage) GetImageSize() int64

func (*DbImage) GetIsBare

func (x *DbImage) GetIsBare() bool

func (*DbImage) GetLastMountError

func (x *DbImage) GetLastMountError() string

func (*DbImage) GetMountPoint

func (x *DbImage) GetMountPoint() string

func (*DbImage) GetMountState

func (x *DbImage) GetMountState() MountState

func (*DbImage) GetStorePath

func (x *DbImage) GetStorePath() string

func (*DbImage) GetSyscheckerSystem

func (x *DbImage) GetSyscheckerSystem() int64

func (*DbImage) GetUpstream

func (x *DbImage) GetUpstream() string

func (*DbImage) ProtoMessage

func (*DbImage) ProtoMessage()

func (*DbImage) ProtoReflect

func (x *DbImage) ProtoReflect() protoreflect.Message

func (*DbImage) Reset

func (x *DbImage) Reset()

func (*DbImage) String

func (x *DbImage) String() string

type DbParams

type DbParams struct {
	Params *DaemonParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	Pubkey []string      `protobuf:"bytes,2,rep,name=pubkey,proto3" json:"pubkey,omitempty"`
	// contains filtered or unexported fields
}

key: "meta" / "params"

func (*DbParams) Descriptor deprecated

func (*DbParams) Descriptor() ([]byte, []int)

Deprecated: Use DbParams.ProtoReflect.Descriptor instead.

func (*DbParams) GetParams

func (x *DbParams) GetParams() *DaemonParams

func (*DbParams) GetPubkey

func (x *DbParams) GetPubkey() []string

func (*DbParams) ProtoMessage

func (*DbParams) ProtoMessage()

func (*DbParams) ProtoReflect

func (x *DbParams) ProtoReflect() protoreflect.Message

func (*DbParams) Reset

func (x *DbParams) Reset()

func (*DbParams) String

func (x *DbParams) String() string

type Entry

type Entry struct {
	Path       string    `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`                    // Path of the entry, relative inside the NAR
	Type       EntryType `protobuf:"varint,2,opt,name=type,proto3,enum=pb.EntryType" json:"type,omitempty"` // File type (regular/directory/symlink)
	Size       int64     `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`                   // Logical file size in bytes (only for REGULAR)
	Executable bool      `protobuf:"varint,4,opt,name=executable,proto3" json:"executable,omitempty"`       // Set to true for files that are executable
	// For REGULAR and SYMLINK:
	// If size <= small_file_cutoff || type == SYMLINK, full data is here:
	InlineData []byte `protobuf:"bytes,5,opt,name=inline_data,json=inlineData,proto3" json:"inline_data,omitempty"`
	// Otherwise, this is a series of concatenated digests, one per chunk:
	Digests []byte `protobuf:"bytes,6,opt,name=digests,proto3" json:"digests,omitempty"`
	// Debug data (only in debug output, not on network or db)
	StatsInlineData    int32 `protobuf:"varint,100,opt,name=stats_inline_data,json=statsInlineData,proto3" json:"stats_inline_data,omitempty"`
	StatsPresentChunks int32 `protobuf:"varint,101,opt,name=stats_present_chunks,json=statsPresentChunks,proto3" json:"stats_present_chunks,omitempty"`
	StatsPresentBlocks int32 `protobuf:"varint,102,opt,name=stats_present_blocks,json=statsPresentBlocks,proto3" json:"stats_present_blocks,omitempty"`
	// contains filtered or unexported fields
}

Mostly modeled on nar Header

func (*Entry) Descriptor deprecated

func (*Entry) Descriptor() ([]byte, []int)

Deprecated: Use Entry.ProtoReflect.Descriptor instead.

func (*Entry) GetDigests

func (x *Entry) GetDigests() []byte

func (*Entry) GetExecutable

func (x *Entry) GetExecutable() bool

func (*Entry) GetInlineData

func (x *Entry) GetInlineData() []byte

func (*Entry) GetPath

func (x *Entry) GetPath() string

func (*Entry) GetSize

func (x *Entry) GetSize() int64

func (*Entry) GetStatsInlineData

func (x *Entry) GetStatsInlineData() int32

func (*Entry) GetStatsPresentBlocks

func (x *Entry) GetStatsPresentBlocks() int32

func (*Entry) GetStatsPresentChunks

func (x *Entry) GetStatsPresentChunks() int32

func (*Entry) GetType

func (x *Entry) GetType() EntryType

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) ProtoReflect

func (x *Entry) ProtoReflect() protoreflect.Message

func (*Entry) Reset

func (x *Entry) Reset()

func (*Entry) String

func (x *Entry) String() string

type EntryType

type EntryType int32
const (
	EntryType_UNKNOWN   EntryType = 0
	EntryType_REGULAR   EntryType = 1
	EntryType_DIRECTORY EntryType = 2
	EntryType_SYMLINK   EntryType = 3
)

func (EntryType) Descriptor

func (EntryType) Descriptor() protoreflect.EnumDescriptor

func (EntryType) Enum

func (x EntryType) Enum() *EntryType

func (EntryType) EnumDescriptor deprecated

func (EntryType) EnumDescriptor() ([]byte, []int)

Deprecated: Use EntryType.Descriptor instead.

func (EntryType) Number

func (x EntryType) Number() protoreflect.EnumNumber

func (EntryType) String

func (x EntryType) String() string

func (EntryType) Type

type GlobalParams

type GlobalParams struct {

	// Bits of chunk size, e.g. 16 = 1<<16 byte chunks
	ChunkShift int32 `protobuf:"varint,1,opt,name=chunk_shift,json=chunkShift,proto3" json:"chunk_shift,omitempty"`
	// Digest algorithm, e.g. "sha256"
	DigestAlgo string `protobuf:"bytes,2,opt,name=digest_algo,json=digestAlgo,proto3" json:"digest_algo,omitempty"`
	// Bits of digest used, e.g. 192
	DigestBits int32 `protobuf:"varint,3,opt,name=digest_bits,json=digestBits,proto3" json:"digest_bits,omitempty"`
	// contains filtered or unexported fields
}

Parameters that have to be agreed on by manifester and daemon.

func (*GlobalParams) Descriptor deprecated

func (*GlobalParams) Descriptor() ([]byte, []int)

Deprecated: Use GlobalParams.ProtoReflect.Descriptor instead.

func (*GlobalParams) GetChunkShift

func (x *GlobalParams) GetChunkShift() int32

func (*GlobalParams) GetDigestAlgo

func (x *GlobalParams) GetDigestAlgo() string

func (*GlobalParams) GetDigestBits

func (x *GlobalParams) GetDigestBits() int32

func (*GlobalParams) ProtoMessage

func (*GlobalParams) ProtoMessage()

func (*GlobalParams) ProtoReflect

func (x *GlobalParams) ProtoReflect() protoreflect.Message

func (*GlobalParams) Reset

func (x *GlobalParams) Reset()

func (*GlobalParams) String

func (x *GlobalParams) String() string

type Manifest

type Manifest struct {
	Params  *GlobalParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	Entries []*Entry      `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries,omitempty"`
	// build parameters
	SmallFileCutoff int32 `protobuf:"varint,2,opt,name=small_file_cutoff,json=smallFileCutoff,proto3" json:"small_file_cutoff,omitempty"`
	// Metadata on how this was generated
	Meta *ManifestMeta `protobuf:"bytes,10,opt,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

func (*Manifest) Descriptor deprecated

func (*Manifest) Descriptor() ([]byte, []int)

Deprecated: Use Manifest.ProtoReflect.Descriptor instead.

func (*Manifest) GetEntries

func (x *Manifest) GetEntries() []*Entry

func (*Manifest) GetMeta

func (x *Manifest) GetMeta() *ManifestMeta

func (*Manifest) GetParams

func (x *Manifest) GetParams() *GlobalParams

func (*Manifest) GetSmallFileCutoff

func (x *Manifest) GetSmallFileCutoff() int32

func (*Manifest) ProtoMessage

func (*Manifest) ProtoMessage()

func (*Manifest) ProtoReflect

func (x *Manifest) ProtoReflect() protoreflect.Message

func (*Manifest) Reset

func (x *Manifest) Reset()

func (*Manifest) String

func (x *Manifest) String() string

type ManifestMeta

type ManifestMeta struct {

	// meta info for what this manifest was generated from
	NarinfoUrl    string   `protobuf:"bytes,1,opt,name=narinfo_url,json=narinfoUrl,proto3" json:"narinfo_url,omitempty"`            // url that narinfo was fetched from
	Narinfo       *NarInfo `protobuf:"bytes,2,opt,name=narinfo,proto3" json:"narinfo,omitempty"`                                    // parsed narinfo (includes references, signatures, etc.)
	Generator     string   `protobuf:"bytes,10,opt,name=generator,proto3" json:"generator,omitempty"`                               // software version of generator
	GeneratedTime int64    `protobuf:"varint,11,opt,name=generated_time,json=generatedTime,proto3" json:"generated_time,omitempty"` // timestamp when this was generated (unix seconds)
	// contains filtered or unexported fields
}

func (*ManifestMeta) Descriptor deprecated

func (*ManifestMeta) Descriptor() ([]byte, []int)

Deprecated: Use ManifestMeta.ProtoReflect.Descriptor instead.

func (*ManifestMeta) GetGeneratedTime

func (x *ManifestMeta) GetGeneratedTime() int64

func (*ManifestMeta) GetGenerator

func (x *ManifestMeta) GetGenerator() string

func (*ManifestMeta) GetNarinfo

func (x *ManifestMeta) GetNarinfo() *NarInfo

func (*ManifestMeta) GetNarinfoUrl

func (x *ManifestMeta) GetNarinfoUrl() string

func (*ManifestMeta) ProtoMessage

func (*ManifestMeta) ProtoMessage()

func (*ManifestMeta) ProtoReflect

func (x *ManifestMeta) ProtoReflect() protoreflect.Message

func (*ManifestMeta) Reset

func (x *ManifestMeta) Reset()

func (*ManifestMeta) String

func (x *ManifestMeta) String() string

type MountState

type MountState int32
const (
	MountState_Unknown          MountState = 0 // initial value
	MountState_Requested        MountState = 1 // requested but not mounted yet
	MountState_Mounted          MountState = 2 // mounted
	MountState_MountError       MountState = 3 // got error mounting
	MountState_UnmountRequested MountState = 4 // was mounted then requested unmount
	MountState_Unmounted        MountState = 5 // unmounted
	MountState_Deleted          MountState = 6 // deleted (not used now)
)

func (MountState) Descriptor

func (MountState) Descriptor() protoreflect.EnumDescriptor

func (MountState) Enum

func (x MountState) Enum() *MountState

func (MountState) EnumDescriptor deprecated

func (MountState) EnumDescriptor() ([]byte, []int)

Deprecated: Use MountState.Descriptor instead.

func (MountState) Number

func (x MountState) Number() protoreflect.EnumNumber

func (MountState) String

func (x MountState) String() string

func (MountState) Type

type NarInfo

type NarInfo struct {
	StorePath   string `protobuf:"bytes,1,opt,name=store_path,json=storePath,proto3" json:"store_path,omitempty"` // The full nix store path (/nix/store/…-pname-version)
	Url         string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`                              // The relative location to the .nar[.xz,…] file. Usually nar/$fileHash.nar[.xz]
	Compression string `protobuf:"bytes,3,opt,name=compression,proto3" json:"compression,omitempty"`              // The compression method file at URL is compressed with (none,xz,…)
	FileHash    string `protobuf:"bytes,4,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty"`    // The hash of the file at URL (nix string format)
	FileSize    int64  `protobuf:"varint,5,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`   // The size of the file at URL, in bytes
	// The hash of the .nar file, after possible decompression (nix string format)
	// Identical to FileHash if no compression is used.
	NarHash string `protobuf:"bytes,6,opt,name=nar_hash,json=narHash,proto3" json:"nar_hash,omitempty"`
	// The size of the .nar file, after possible decompression, in bytes.
	// Identical to FileSize if no compression is used.
	NarSize    int64    `protobuf:"varint,7,opt,name=nar_size,json=narSize,proto3" json:"nar_size,omitempty"`
	References []string `protobuf:"bytes,8,rep,name=references,proto3" json:"references,omitempty"`  // References to other store paths, contained in the .nar file
	Deriver    string   `protobuf:"bytes,9,opt,name=deriver,proto3" json:"deriver,omitempty"`        // Path of the .drv for this store path
	System     string   `protobuf:"bytes,10,opt,name=system,proto3" json:"system,omitempty"`         // This doesn't seem to be used at all?
	Signatures []string `protobuf:"bytes,11,rep,name=signatures,proto3" json:"signatures,omitempty"` // Signatures, if any.
	Ca         string   `protobuf:"bytes,12,opt,name=ca,proto3" json:"ca,omitempty"`
	// contains filtered or unexported fields
}

from github.com/nix-community/go-nix pkg/narinfo/types.go

func (*NarInfo) Descriptor deprecated

func (*NarInfo) Descriptor() ([]byte, []int)

Deprecated: Use NarInfo.ProtoReflect.Descriptor instead.

func (*NarInfo) GetCa

func (x *NarInfo) GetCa() string

func (*NarInfo) GetCompression

func (x *NarInfo) GetCompression() string

func (*NarInfo) GetDeriver

func (x *NarInfo) GetDeriver() string

func (*NarInfo) GetFileHash

func (x *NarInfo) GetFileHash() string

func (*NarInfo) GetFileSize

func (x *NarInfo) GetFileSize() int64

func (*NarInfo) GetNarHash

func (x *NarInfo) GetNarHash() string

func (*NarInfo) GetNarSize

func (x *NarInfo) GetNarSize() int64

func (*NarInfo) GetReferences

func (x *NarInfo) GetReferences() []string

func (*NarInfo) GetSignatures

func (x *NarInfo) GetSignatures() []string

func (*NarInfo) GetStorePath

func (x *NarInfo) GetStorePath() string

func (*NarInfo) GetSystem

func (x *NarInfo) GetSystem() string

func (*NarInfo) GetUrl

func (x *NarInfo) GetUrl() string

func (*NarInfo) ProtoMessage

func (*NarInfo) ProtoMessage()

func (*NarInfo) ProtoReflect

func (x *NarInfo) ProtoReflect() protoreflect.Message

func (*NarInfo) Reset

func (x *NarInfo) Reset()

func (*NarInfo) String

func (x *NarInfo) String() string

type SignedMessage

type SignedMessage struct {

	// Params for hashing/chunking contained data, and also used for signature.
	Params *GlobalParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	// Single entry representing contained data.
	// Type must be REGULAR.
	// Path should represent message type and context.
	Msg *Entry `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// These should be the same length:
	KeyId     []string `protobuf:"bytes,3,rep,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	Signature [][]byte `protobuf:"bytes,4,rep,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*SignedMessage) Descriptor deprecated

func (*SignedMessage) Descriptor() ([]byte, []int)

Deprecated: Use SignedMessage.ProtoReflect.Descriptor instead.

func (*SignedMessage) GetKeyId

func (x *SignedMessage) GetKeyId() []string

func (*SignedMessage) GetMsg

func (x *SignedMessage) GetMsg() *Entry

func (*SignedMessage) GetParams

func (x *SignedMessage) GetParams() *GlobalParams

func (*SignedMessage) GetSignature

func (x *SignedMessage) GetSignature() [][]byte

func (*SignedMessage) ProtoMessage

func (*SignedMessage) ProtoMessage()

func (*SignedMessage) ProtoReflect

func (x *SignedMessage) ProtoReflect() protoreflect.Message

func (*SignedMessage) Reset

func (x *SignedMessage) Reset()

func (*SignedMessage) String

func (x *SignedMessage) String() string

Jump to

Keyboard shortcuts

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