localfile

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

Local file

Service to manipulate file on remote machines

Usage

sanssh file get-data

Get data from a file of specific format on a remote host by specified data key.

sanssh <sanssh-args> file get-data [--format <file-format>] <file-path> <data-key>

Where:

  • <sanssh-args> common sanssh arguments
  • <file-path> is the path to the file on remote machine. If --format is not provided, format would be detected from file extension.
  • <data-key> is the key to read from the file. For different file formats it would require keys in different format
    • for yml, key should be valid YAMLPath string
    • for dotenv, key should be a name of variable
  • <file-format> is the format of the file, if specified it would override the format detected from file extension. Supported formats are:
    • yml
    • dotenv

Examples:

# Get data from a yml file
sanssh --targets $TARGET file get-data /etc/config.yml "$.databases[0].host"
# Get data from a dotenv with explicitly specified format
sanssh --targets file get-data --format dotenv /etc/some-config "HOST"
sanssh file set-data

Set data to a file of specific format on a remote host by specified data key.

sanssh <sanssh-args> file set-data [--format <file-format>] [--value-type <value-type>] <file-path> <data-key> <value>

Where:

  • <sanssh-args> common sanssh arguments
  • <file-path> is the path to the file on remote machine. If --format is not provided, format would be detected from file extension.
  • <data-key> is the key to set value in the file. For different file formats it would require keys in different format
    • for yml, key should be valid YAMLPath string
    • for dotenv, key should be a name of variable
  • <value> is the value to set in the file
  • <file-format> is the format of the file, if specified it would override the format detected from file extension. Supported formats are:
    • yml
    • dotenv
  • <value-type> is the type of value to set in the file. By default, string. Supported types are:
    • string
    • int
    • float
    • bool

Examples:

# Set data to a yml file
sanssh --targets $TARGET file set-data /etc/config.yml "database.host" "localhost"
# Set data to a dotenv with explicitly specified format
sanssh --targets file set-data --format dotenv /etc/some-config "HOST" "localhost"
# Set data specified type
sanssh --targets file set-data --value-type int /etc/config.yml "database.port" 8080

Documentation

Overview

Package localfile defines the RPC interface for the sansshell LocalFile actions.

Index

Constants

View Source
const (
	LocalFile_Read_FullMethodName              = "/LocalFile.LocalFile/Read"
	LocalFile_Stat_FullMethodName              = "/LocalFile.LocalFile/Stat"
	LocalFile_Sum_FullMethodName               = "/LocalFile.LocalFile/Sum"
	LocalFile_Write_FullMethodName             = "/LocalFile.LocalFile/Write"
	LocalFile_Copy_FullMethodName              = "/LocalFile.LocalFile/Copy"
	LocalFile_List_FullMethodName              = "/LocalFile.LocalFile/List"
	LocalFile_SetFileAttributes_FullMethodName = "/LocalFile.LocalFile/SetFileAttributes"
	LocalFile_Rm_FullMethodName                = "/LocalFile.LocalFile/Rm"
	LocalFile_Rmdir_FullMethodName             = "/LocalFile.LocalFile/Rmdir"
	LocalFile_Rename_FullMethodName            = "/LocalFile.LocalFile/Rename"
	LocalFile_Readlink_FullMethodName          = "/LocalFile.LocalFile/Readlink"
	LocalFile_Symlink_FullMethodName           = "/LocalFile.LocalFile/Symlink"
	LocalFile_Mkdir_FullMethodName             = "/LocalFile.LocalFile/Mkdir"
	LocalFile_DataGet_FullMethodName           = "/LocalFile.LocalFile/DataGet"
	LocalFile_DataSet_FullMethodName           = "/LocalFile.LocalFile/DataSet"
)

Variables

View Source
var (
	SumType_name = map[int32]string{
		0: "SUM_TYPE_UNKNOWN",
		1: "SUM_TYPE_CRC32IEEE",
		2: "SUM_TYPE_MD5",
		3: "SUM_TYPE_SHA256",
		4: "SUM_TYPE_SHA512_256",
	}
	SumType_value = map[string]int32{
		"SUM_TYPE_UNKNOWN":    0,
		"SUM_TYPE_CRC32IEEE":  1,
		"SUM_TYPE_MD5":        2,
		"SUM_TYPE_SHA256":     3,
		"SUM_TYPE_SHA512_256": 4,
	}
)

Enum value maps for SumType.

View Source
var (
	FileFormat_name = map[int32]string{
		0: "UNKNOWN",
		1: "YML",
		2: "DOTENV",
	}
	FileFormat_value = map[string]int32{
		"UNKNOWN": 0,
		"YML":     1,
		"DOTENV":  2,
	}
)

Enum value maps for FileFormat.

View Source
var (
	DataSetValueType_name = map[int32]string{
		0: "UNKNOWN_VAL",
		1: "STRING_VAL",
		2: "INT_VAL",
		3: "FLOAT_VAL",
		4: "BOOL_VAL",
	}
	DataSetValueType_value = map[string]int32{
		"UNKNOWN_VAL": 0,
		"STRING_VAL":  1,
		"INT_VAL":     2,
		"FLOAT_VAL":   3,
		"BOOL_VAL":    4,
	}
)

Enum value maps for DataSetValueType.

View Source
var File_localfile_proto protoreflect.FileDescriptor
View Source
var LocalFile_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "LocalFile.LocalFile",
	HandlerType: (*LocalFileServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Copy",
			Handler:    _LocalFile_Copy_Handler,
		},
		{
			MethodName: "SetFileAttributes",
			Handler:    _LocalFile_SetFileAttributes_Handler,
		},
		{
			MethodName: "Rm",
			Handler:    _LocalFile_Rm_Handler,
		},
		{
			MethodName: "Rmdir",
			Handler:    _LocalFile_Rmdir_Handler,
		},
		{
			MethodName: "Rename",
			Handler:    _LocalFile_Rename_Handler,
		},
		{
			MethodName: "Readlink",
			Handler:    _LocalFile_Readlink_Handler,
		},
		{
			MethodName: "Symlink",
			Handler:    _LocalFile_Symlink_Handler,
		},
		{
			MethodName: "Mkdir",
			Handler:    _LocalFile_Mkdir_Handler,
		},
		{
			MethodName: "DataGet",
			Handler:    _LocalFile_DataGet_Handler,
		},
		{
			MethodName: "DataSet",
			Handler:    _LocalFile_DataSet_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Read",
			Handler:       _LocalFile_Read_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Stat",
			Handler:       _LocalFile_Stat_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Sum",
			Handler:       _LocalFile_Sum_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Write",
			Handler:       _LocalFile_Write_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "List",
			Handler:       _LocalFile_List_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "localfile.proto",
}

LocalFile_ServiceDesc is the grpc.ServiceDesc for LocalFile service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLocalFileServer

func RegisterLocalFileServer(s grpc.ServiceRegistrar, srv LocalFileServer)

Types

type CopyManyResponse

type CopyManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

CopyManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type CopyRequest

type CopyRequest struct {
	Destination *FileWrite `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
	// The source bucket to copy from. See implementations for details on schemes
	// but will at a minimum support file://<path> for local copies.
	Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
	// The key to reference inside of the bucket.
	Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	// Any additional data the URL destination may need in order
	// to succeed (such as an auth token for a blob service).
	BlobData []byte `protobuf:"bytes,4,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"`
	// contains filtered or unexported fields
}

CopyRequest contains the URL and filename destination to copy the file from.

func (*CopyRequest) Descriptor deprecated

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

Deprecated: Use CopyRequest.ProtoReflect.Descriptor instead.

func (*CopyRequest) GetBlobData

func (x *CopyRequest) GetBlobData() []byte

func (*CopyRequest) GetBucket

func (x *CopyRequest) GetBucket() string

func (*CopyRequest) GetDestination

func (x *CopyRequest) GetDestination() *FileWrite

func (*CopyRequest) GetKey

func (x *CopyRequest) GetKey() string

func (*CopyRequest) ProtoMessage

func (*CopyRequest) ProtoMessage()

func (*CopyRequest) ProtoReflect

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

func (*CopyRequest) Reset

func (x *CopyRequest) Reset()

func (*CopyRequest) String

func (x *CopyRequest) String() string

type DataGetManyResponse added in v1.37.0

type DataGetManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *DataGetReply
	Error error
}

DataGetManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type DataGetReply added in v1.37.0

type DataGetReply struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

DataGetReply contains the value of read from file

func (*DataGetReply) Descriptor deprecated added in v1.37.0

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

Deprecated: Use DataGetReply.ProtoReflect.Descriptor instead.

func (*DataGetReply) GetValue added in v1.37.0

func (x *DataGetReply) GetValue() string

func (*DataGetReply) ProtoMessage added in v1.37.0

func (*DataGetReply) ProtoMessage()

func (*DataGetReply) ProtoReflect added in v1.37.0

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

func (*DataGetReply) Reset added in v1.37.0

func (x *DataGetReply) Reset()

func (*DataGetReply) String added in v1.37.0

func (x *DataGetReply) String() string

type DataGetRequest added in v1.37.0

type DataGetRequest struct {
	Filename   string     `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	FileFormat FileFormat `protobuf:"varint,2,opt,name=file_format,json=fileFormat,proto3,enum=LocalFile.FileFormat" json:"file_format,omitempty"`
	DataKey    string     `protobuf:"bytes,3,opt,name=data_key,json=dataKey,proto3" json:"data_key,omitempty"`
	// contains filtered or unexported fields
}

DataGetRequest is request to read data from a specific file in specific format

func (*DataGetRequest) Descriptor deprecated added in v1.37.0

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

Deprecated: Use DataGetRequest.ProtoReflect.Descriptor instead.

func (*DataGetRequest) GetDataKey added in v1.37.0

func (x *DataGetRequest) GetDataKey() string

func (*DataGetRequest) GetFileFormat added in v1.37.0

func (x *DataGetRequest) GetFileFormat() FileFormat

func (*DataGetRequest) GetFilename added in v1.37.0

func (x *DataGetRequest) GetFilename() string

func (*DataGetRequest) ProtoMessage added in v1.37.0

func (*DataGetRequest) ProtoMessage()

func (*DataGetRequest) ProtoReflect added in v1.37.0

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

func (*DataGetRequest) Reset added in v1.37.0

func (x *DataGetRequest) Reset()

func (*DataGetRequest) String added in v1.37.0

func (x *DataGetRequest) String() string

type DataSetManyResponse added in v1.37.0

type DataSetManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

DataSetManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type DataSetRequest added in v1.37.0

type DataSetRequest struct {
	Filename   string           `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	FileFormat FileFormat       `protobuf:"varint,2,opt,name=file_format,json=fileFormat,proto3,enum=LocalFile.FileFormat" json:"file_format,omitempty"`
	DataKey    string           `protobuf:"bytes,3,opt,name=data_key,json=dataKey,proto3" json:"data_key,omitempty"`
	Value      string           `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	ValueType  DataSetValueType `protobuf:"varint,5,opt,name=value_type,json=valueType,proto3,enum=LocalFile.DataSetValueType" json:"value_type,omitempty"`
	// contains filtered or unexported fields
}

DataSetRequest is request to set property in a specific file in specific format

func (*DataSetRequest) Descriptor deprecated added in v1.37.0

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

Deprecated: Use DataSetRequest.ProtoReflect.Descriptor instead.

func (*DataSetRequest) GetDataKey added in v1.37.0

func (x *DataSetRequest) GetDataKey() string

func (*DataSetRequest) GetFileFormat added in v1.37.0

func (x *DataSetRequest) GetFileFormat() FileFormat

func (*DataSetRequest) GetFilename added in v1.37.0

func (x *DataSetRequest) GetFilename() string

func (*DataSetRequest) GetValue added in v1.37.0

func (x *DataSetRequest) GetValue() string

func (*DataSetRequest) GetValueType added in v1.37.0

func (x *DataSetRequest) GetValueType() DataSetValueType

func (*DataSetRequest) ProtoMessage added in v1.37.0

func (*DataSetRequest) ProtoMessage()

func (*DataSetRequest) ProtoReflect added in v1.37.0

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

func (*DataSetRequest) Reset added in v1.37.0

func (x *DataSetRequest) Reset()

func (*DataSetRequest) String added in v1.37.0

func (x *DataSetRequest) String() string

type DataSetValueType added in v1.37.0

type DataSetValueType int32

DataSetValueType enum what represents how represent value in a file

const (
	DataSetValueType_UNKNOWN_VAL DataSetValueType = 0
	DataSetValueType_STRING_VAL  DataSetValueType = 1
	DataSetValueType_INT_VAL     DataSetValueType = 2
	DataSetValueType_FLOAT_VAL   DataSetValueType = 3
	DataSetValueType_BOOL_VAL    DataSetValueType = 4
)

func (DataSetValueType) Descriptor added in v1.37.0

func (DataSetValueType) Enum added in v1.37.0

func (DataSetValueType) EnumDescriptor deprecated added in v1.37.0

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

Deprecated: Use DataSetValueType.Descriptor instead.

func (DataSetValueType) Number added in v1.37.0

func (DataSetValueType) String added in v1.37.0

func (x DataSetValueType) String() string

func (DataSetValueType) Type added in v1.37.0

type FileAttribute

type FileAttribute struct {

	// Types that are assignable to Value:
	//
	//	*FileAttribute_Uid
	//	*FileAttribute_Username
	//	*FileAttribute_Gid
	//	*FileAttribute_Group
	//	*FileAttribute_Mode
	//	*FileAttribute_Immutable
	Value isFileAttribute_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

FileAttributes describes a file/directory and an attributed of it. It's used together with repeated fields and a path to describe an entire entity.

func (*FileAttribute) Descriptor deprecated

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

Deprecated: Use FileAttribute.ProtoReflect.Descriptor instead.

func (*FileAttribute) GetGid

func (x *FileAttribute) GetGid() uint32

func (*FileAttribute) GetGroup added in v1.0.10

func (x *FileAttribute) GetGroup() string

func (*FileAttribute) GetImmutable

func (x *FileAttribute) GetImmutable() bool

func (*FileAttribute) GetMode

func (x *FileAttribute) GetMode() uint32

func (*FileAttribute) GetUid

func (x *FileAttribute) GetUid() uint32

func (*FileAttribute) GetUsername added in v1.0.10

func (x *FileAttribute) GetUsername() string

func (*FileAttribute) GetValue

func (m *FileAttribute) GetValue() isFileAttribute_Value

func (*FileAttribute) ProtoMessage

func (*FileAttribute) ProtoMessage()

func (*FileAttribute) ProtoReflect

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

func (*FileAttribute) Reset

func (x *FileAttribute) Reset()

func (*FileAttribute) String

func (x *FileAttribute) String() string

type FileAttribute_Gid

type FileAttribute_Gid struct {
	Gid uint32 `protobuf:"varint,2,opt,name=gid,proto3,oneof"`
}

type FileAttribute_Group added in v1.0.10

type FileAttribute_Group struct {
	Group string `protobuf:"bytes,6,opt,name=group,proto3,oneof"` // Use in place of gid and server will lookup.
}

type FileAttribute_Immutable

type FileAttribute_Immutable struct {
	Immutable bool `protobuf:"varint,4,opt,name=immutable,proto3,oneof"`
}

type FileAttribute_Mode

type FileAttribute_Mode struct {
	// Only the lower 12 bits are used per unix conventions.
	Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3,oneof"`
}

type FileAttribute_Uid

type FileAttribute_Uid struct {
	Uid uint32 `protobuf:"varint,1,opt,name=uid,proto3,oneof"`
}

type FileAttribute_Username added in v1.0.10

type FileAttribute_Username struct {
	Username string `protobuf:"bytes,5,opt,name=username,proto3,oneof"` // Use in place of uid and server will lookup.
}

type FileAttributes

type FileAttributes struct {
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// A given attributes (uid, gid, etc) can only be set once.
	Attributes []*FileAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

FileAttributes describes everything about a given file/directory.

func (*FileAttributes) Descriptor deprecated

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

Deprecated: Use FileAttributes.ProtoReflect.Descriptor instead.

func (*FileAttributes) GetAttributes

func (x *FileAttributes) GetAttributes() []*FileAttribute

func (*FileAttributes) GetFilename

func (x *FileAttributes) GetFilename() string

func (*FileAttributes) ProtoMessage

func (*FileAttributes) ProtoMessage()

func (*FileAttributes) ProtoReflect

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

func (*FileAttributes) Reset

func (x *FileAttributes) Reset()

func (*FileAttributes) String

func (x *FileAttributes) String() string

type FileFormat added in v1.37.0

type FileFormat int32

FileFormat enum what represents file formats

const (
	FileFormat_UNKNOWN FileFormat = 0
	FileFormat_YML     FileFormat = 1
	FileFormat_DOTENV  FileFormat = 2
)

func (FileFormat) Descriptor added in v1.37.0

func (FileFormat) Descriptor() protoreflect.EnumDescriptor

func (FileFormat) Enum added in v1.37.0

func (x FileFormat) Enum() *FileFormat

func (FileFormat) EnumDescriptor deprecated added in v1.37.0

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

Deprecated: Use FileFormat.Descriptor instead.

func (FileFormat) Number added in v1.37.0

func (x FileFormat) Number() protoreflect.EnumNumber

func (FileFormat) String added in v1.37.0

func (x FileFormat) String() string

func (FileFormat) Type added in v1.37.0

type FileWrite

type FileWrite struct {

	// For a newly written file uid/gid/mode are required attributes
	// while immutable is optional.
	Attrs *FileAttributes `protobuf:"bytes,1,opt,name=attrs,proto3" json:"attrs,omitempty"`
	// If true allow to truncate and overwrite an existing file. Otherwise
	// the file must not exist. This is still subject to races as all incoming
	// data is written to a tempfile before moved to the final destination so
	// multiple system calls will take place.
	Overwrite bool `protobuf:"varint,2,opt,name=overwrite,proto3" json:"overwrite,omitempty"`
	// contains filtered or unexported fields
}

FileWrite describes everything about a file to be written.

func (*FileWrite) Descriptor deprecated

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

Deprecated: Use FileWrite.ProtoReflect.Descriptor instead.

func (*FileWrite) GetAttrs

func (x *FileWrite) GetAttrs() *FileAttributes

func (*FileWrite) GetOverwrite

func (x *FileWrite) GetOverwrite() bool

func (*FileWrite) ProtoMessage

func (*FileWrite) ProtoMessage()

func (*FileWrite) ProtoReflect

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

func (*FileWrite) Reset

func (x *FileWrite) Reset()

func (*FileWrite) String

func (x *FileWrite) String() string

type ListManyResponse

type ListManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *ListReply
	Error error
}

ListManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type ListReply

type ListReply struct {
	Entry *StatReply `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"`
	// contains filtered or unexported fields
}

ListReply will begin with the entry followed by N entries (if a directory) until that level of the tree is exhausted.

func (*ListReply) Descriptor deprecated

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

Deprecated: Use ListReply.ProtoReflect.Descriptor instead.

func (*ListReply) GetEntry

func (x *ListReply) GetEntry() *StatReply

func (*ListReply) ProtoMessage

func (*ListReply) ProtoMessage()

func (*ListReply) ProtoReflect

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

func (*ListReply) Reset

func (x *ListReply) Reset()

func (*ListReply) String

func (x *ListReply) String() string

type ListRequest

type ListRequest struct {

	// The entry to list.
	Entry string `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"`
	// contains filtered or unexported fields
}

ListRequest will do an expansion on the entry given to list all things located there. If entry is a file only that data will be returned.

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetEntry

func (x *ListRequest) GetEntry() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type LocalFileClient

type LocalFileClient interface {
	// Read reads a file from the disk and returns it contents.
	Read(ctx context.Context, in *ReadActionRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ReadReply], error)
	// Stat returns metadata about a filesystem path.
	Stat(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StatRequest, StatReply], error)
	// Sum calculates a sum over the data in a single file.
	Sum(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SumRequest, SumReply], error)
	// Write writes a file from the incoming RPC to a local file.
	Write(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[WriteRequest, emptypb.Empty], error)
	// Copy retrieves a file from the given blob URL and writes it to a local
	// file.
	Copy(ctx context.Context, in *CopyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// List returns StatReply entries for the entities contained at a given path.
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListReply], error)
	// SetFileAttributes takes a given filename and sets the given attributes.
	SetFileAttributes(ctx context.Context, in *SetFileAttributesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Rm removes the given file.
	Rm(ctx context.Context, in *RmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Rmdir removes the given directory (must be empty).
	Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Rename renames (moves) the given file to a new name. If the destination
	// is not a directory it will be replaced if it already exists.
	// OS restrictions may apply if the old and new names are outside of the same
	// directory.
	Rename(ctx context.Context, in *RenameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Readlink prints the value of a symbolic link
	Readlink(ctx context.Context, in *ReadlinkRequest, opts ...grpc.CallOption) (*ReadlinkReply, error)
	// Symlink creates a symbolic link
	Symlink(ctx context.Context, in *SymlinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Mkdir create a new directory.
	Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Get data from a file of specified type by provided key
	DataGet(ctx context.Context, in *DataGetRequest, opts ...grpc.CallOption) (*DataGetReply, error)
	// Set property from a file of specified type by provided key
	DataSet(ctx context.Context, in *DataSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

LocalFileClient is the client API for LocalFile service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

The LocalFile service definition.

func NewLocalFileClient

func NewLocalFileClient(cc grpc.ClientConnInterface) LocalFileClient

type LocalFileClientProxy

type LocalFileClientProxy interface {
	LocalFileClient
	ReadOneMany(ctx context.Context, in *ReadActionRequest, opts ...grpc.CallOption) (LocalFile_ReadClientProxy, error)
	StatOneMany(ctx context.Context, opts ...grpc.CallOption) (LocalFile_StatClientProxy, error)
	SumOneMany(ctx context.Context, opts ...grpc.CallOption) (LocalFile_SumClientProxy, error)
	WriteOneMany(ctx context.Context, opts ...grpc.CallOption) (LocalFile_WriteClientProxy, error)
	CopyOneMany(ctx context.Context, in *CopyRequest, opts ...grpc.CallOption) (<-chan *CopyManyResponse, error)
	ListOneMany(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (LocalFile_ListClientProxy, error)
	SetFileAttributesOneMany(ctx context.Context, in *SetFileAttributesRequest, opts ...grpc.CallOption) (<-chan *SetFileAttributesManyResponse, error)
	RmOneMany(ctx context.Context, in *RmRequest, opts ...grpc.CallOption) (<-chan *RmManyResponse, error)
	RmdirOneMany(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (<-chan *RmdirManyResponse, error)
	RenameOneMany(ctx context.Context, in *RenameRequest, opts ...grpc.CallOption) (<-chan *RenameManyResponse, error)
	ReadlinkOneMany(ctx context.Context, in *ReadlinkRequest, opts ...grpc.CallOption) (<-chan *ReadlinkManyResponse, error)
	SymlinkOneMany(ctx context.Context, in *SymlinkRequest, opts ...grpc.CallOption) (<-chan *SymlinkManyResponse, error)
	MkdirOneMany(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (<-chan *MkdirManyResponse, error)
	DataGetOneMany(ctx context.Context, in *DataGetRequest, opts ...grpc.CallOption) (<-chan *DataGetManyResponse, error)
	DataSetOneMany(ctx context.Context, in *DataSetRequest, opts ...grpc.CallOption) (<-chan *DataSetManyResponse, error)
}

LocalFileClientProxy is the superset of LocalFileClient which additionally includes the OneMany proxy methods

func NewLocalFileClientProxy

func NewLocalFileClientProxy(cc *proxy.Conn) LocalFileClientProxy

NewLocalFileClientProxy creates a LocalFileClientProxy for use in proxied connections. NOTE: This takes a proxy.Conn instead of a generic ClientConnInterface as the methods here are only valid in proxy.Conn contexts.

type LocalFileServer

type LocalFileServer interface {
	// Read reads a file from the disk and returns it contents.
	Read(*ReadActionRequest, grpc.ServerStreamingServer[ReadReply]) error
	// Stat returns metadata about a filesystem path.
	Stat(grpc.BidiStreamingServer[StatRequest, StatReply]) error
	// Sum calculates a sum over the data in a single file.
	Sum(grpc.BidiStreamingServer[SumRequest, SumReply]) error
	// Write writes a file from the incoming RPC to a local file.
	Write(grpc.ClientStreamingServer[WriteRequest, emptypb.Empty]) error
	// Copy retrieves a file from the given blob URL and writes it to a local
	// file.
	Copy(context.Context, *CopyRequest) (*emptypb.Empty, error)
	// List returns StatReply entries for the entities contained at a given path.
	List(*ListRequest, grpc.ServerStreamingServer[ListReply]) error
	// SetFileAttributes takes a given filename and sets the given attributes.
	SetFileAttributes(context.Context, *SetFileAttributesRequest) (*emptypb.Empty, error)
	// Rm removes the given file.
	Rm(context.Context, *RmRequest) (*emptypb.Empty, error)
	// Rmdir removes the given directory (must be empty).
	Rmdir(context.Context, *RmdirRequest) (*emptypb.Empty, error)
	// Rename renames (moves) the given file to a new name. If the destination
	// is not a directory it will be replaced if it already exists.
	// OS restrictions may apply if the old and new names are outside of the same
	// directory.
	Rename(context.Context, *RenameRequest) (*emptypb.Empty, error)
	// Readlink prints the value of a symbolic link
	Readlink(context.Context, *ReadlinkRequest) (*ReadlinkReply, error)
	// Symlink creates a symbolic link
	Symlink(context.Context, *SymlinkRequest) (*emptypb.Empty, error)
	// Mkdir create a new directory.
	Mkdir(context.Context, *MkdirRequest) (*emptypb.Empty, error)
	// Get property from a file of specified type by provided key
	DataGet(context.Context, *DataGetRequest) (*DataGetReply, error)
	// Set data value to a file of specified type by provided key
	DataSet(context.Context, *DataSetRequest) (*emptypb.Empty, error)
}

LocalFileServer is the server API for LocalFile service. All implementations should embed UnimplementedLocalFileServer for forward compatibility.

The LocalFile service definition.

type LocalFile_ListClient

type LocalFile_ListClient = grpc.ServerStreamingClient[ListReply]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LocalFile_ListClientProxy

type LocalFile_ListClientProxy interface {
	Recv() ([]*ListManyResponse, error)
	grpc.ClientStream
}

type LocalFile_ListServer

type LocalFile_ListServer = grpc.ServerStreamingServer[ListReply]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LocalFile_ReadClient

type LocalFile_ReadClient = grpc.ServerStreamingClient[ReadReply]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LocalFile_ReadClientProxy

type LocalFile_ReadClientProxy interface {
	Recv() ([]*ReadManyResponse, error)
	grpc.ClientStream
}

type LocalFile_ReadServer

type LocalFile_ReadServer = grpc.ServerStreamingServer[ReadReply]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LocalFile_StatClient

type LocalFile_StatClient = grpc.BidiStreamingClient[StatRequest, StatReply]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LocalFile_StatClientProxy

type LocalFile_StatClientProxy interface {
	Send(*StatRequest) error
	Recv() ([]*StatManyResponse, error)
	grpc.ClientStream
}

type LocalFile_StatServer

type LocalFile_StatServer = grpc.BidiStreamingServer[StatRequest, StatReply]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LocalFile_SumClient

type LocalFile_SumClient = grpc.BidiStreamingClient[SumRequest, SumReply]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LocalFile_SumClientProxy

type LocalFile_SumClientProxy interface {
	Send(*SumRequest) error
	Recv() ([]*SumManyResponse, error)
	grpc.ClientStream
}

type LocalFile_SumServer

type LocalFile_SumServer = grpc.BidiStreamingServer[SumRequest, SumReply]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LocalFile_WriteClient

type LocalFile_WriteClient = grpc.ClientStreamingClient[WriteRequest, emptypb.Empty]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LocalFile_WriteClientProxy

type LocalFile_WriteClientProxy interface {
	Send(*WriteRequest) error
	CloseAndRecv() ([]*WriteManyResponse, error)
	grpc.ClientStream
}

type LocalFile_WriteServer

type LocalFile_WriteServer = grpc.ClientStreamingServer[WriteRequest, emptypb.Empty]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type MkdirManyResponse added in v1.22.0

type MkdirManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

MkdirManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type MkdirRequest added in v1.22.0

type MkdirRequest struct {
	DirAttrs *FileAttributes `protobuf:"bytes,1,opt,name=dir_attrs,json=dirAttrs,proto3" json:"dir_attrs,omitempty"`
	// contains filtered or unexported fields
}

MkdirRequest describes the directory

func (*MkdirRequest) Descriptor deprecated added in v1.22.0

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

Deprecated: Use MkdirRequest.ProtoReflect.Descriptor instead.

func (*MkdirRequest) GetDirAttrs added in v1.22.0

func (x *MkdirRequest) GetDirAttrs() *FileAttributes

func (*MkdirRequest) ProtoMessage added in v1.22.0

func (*MkdirRequest) ProtoMessage()

func (*MkdirRequest) ProtoReflect added in v1.22.0

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

func (*MkdirRequest) Reset added in v1.22.0

func (x *MkdirRequest) Reset()

func (*MkdirRequest) String added in v1.22.0

func (x *MkdirRequest) String() string

type ReadActionRequest

type ReadActionRequest struct {

	// Types that are assignable to Request:
	//
	//	*ReadActionRequest_File
	//	*ReadActionRequest_Tail
	Request isReadActionRequest_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

ReadActionRequest indicates the type of read we're performing. Either a file read which then terminates or a tail based read that continues forever (i.e. as tail -f on the command line would do).

func (*ReadActionRequest) Descriptor deprecated

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

Deprecated: Use ReadActionRequest.ProtoReflect.Descriptor instead.

func (*ReadActionRequest) GetFile

func (x *ReadActionRequest) GetFile() *ReadRequest

func (*ReadActionRequest) GetRequest

func (m *ReadActionRequest) GetRequest() isReadActionRequest_Request

func (*ReadActionRequest) GetTail

func (x *ReadActionRequest) GetTail() *TailRequest

func (*ReadActionRequest) ProtoMessage

func (*ReadActionRequest) ProtoMessage()

func (*ReadActionRequest) ProtoReflect

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

func (*ReadActionRequest) Reset

func (x *ReadActionRequest) Reset()

func (*ReadActionRequest) String

func (x *ReadActionRequest) String() string

type ReadActionRequest_File

type ReadActionRequest_File struct {
	File *ReadRequest `protobuf:"bytes,1,opt,name=file,proto3,oneof"`
}

type ReadActionRequest_Tail

type ReadActionRequest_Tail struct {
	Tail *TailRequest `protobuf:"bytes,2,opt,name=tail,proto3,oneof"`
}

type ReadManyResponse

type ReadManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *ReadReply
	Error error
}

ReadManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type ReadReply

type ReadReply struct {
	Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"`
	// contains filtered or unexported fields
}

ReadResponse contains the contents of the file

func (*ReadReply) Descriptor deprecated

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

Deprecated: Use ReadReply.ProtoReflect.Descriptor instead.

func (*ReadReply) GetContents

func (x *ReadReply) GetContents() []byte

func (*ReadReply) ProtoMessage

func (*ReadReply) ProtoMessage()

func (*ReadReply) ProtoReflect

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

func (*ReadReply) Reset

func (x *ReadReply) Reset()

func (*ReadReply) String

func (x *ReadReply) String() string

type ReadRequest

type ReadRequest struct {
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// If non-zero skip N bytes into the file before returning data.
	// Negative implies based from end of file.
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// If positive and non-zero return only this many total bytes.
	Length int64 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"`
	// contains filtered or unexported fields
}

ReadRequest describes the filename to be read

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetFilename

func (x *ReadRequest) GetFilename() string

func (*ReadRequest) GetLength

func (x *ReadRequest) GetLength() int64

func (*ReadRequest) GetOffset

func (x *ReadRequest) GetOffset() int64

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

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

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadlinkManyResponse added in v1.19.0

type ReadlinkManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *ReadlinkReply
	Error error
}

ReadlinkManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type ReadlinkReply added in v1.19.0

type ReadlinkReply struct {

	// The resolved link.
	Linkvalue string `protobuf:"bytes,1,opt,name=linkvalue,proto3" json:"linkvalue,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadlinkReply) Descriptor deprecated added in v1.19.0

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

Deprecated: Use ReadlinkReply.ProtoReflect.Descriptor instead.

func (*ReadlinkReply) GetLinkvalue added in v1.19.0

func (x *ReadlinkReply) GetLinkvalue() string

func (*ReadlinkReply) ProtoMessage added in v1.19.0

func (*ReadlinkReply) ProtoMessage()

func (*ReadlinkReply) ProtoReflect added in v1.19.0

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

func (*ReadlinkReply) Reset added in v1.19.0

func (x *ReadlinkReply) Reset()

func (*ReadlinkReply) String added in v1.19.0

func (x *ReadlinkReply) String() string

type ReadlinkRequest added in v1.19.0

type ReadlinkRequest struct {

	// The fully qualified path to the file to readlink.
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadlinkRequest) Descriptor deprecated added in v1.19.0

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

Deprecated: Use ReadlinkRequest.ProtoReflect.Descriptor instead.

func (*ReadlinkRequest) GetFilename added in v1.19.0

func (x *ReadlinkRequest) GetFilename() string

func (*ReadlinkRequest) ProtoMessage added in v1.19.0

func (*ReadlinkRequest) ProtoMessage()

func (*ReadlinkRequest) ProtoReflect added in v1.19.0

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

func (*ReadlinkRequest) Reset added in v1.19.0

func (x *ReadlinkRequest) Reset()

func (*ReadlinkRequest) String added in v1.19.0

func (x *ReadlinkRequest) String() string

type RenameManyResponse added in v1.6.0

type RenameManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

RenameManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type RenameRequest added in v1.6.0

type RenameRequest struct {
	OriginalName    string `protobuf:"bytes,1,opt,name=original_name,json=originalName,proto3" json:"original_name,omitempty"`
	DestinationName string `protobuf:"bytes,2,opt,name=destination_name,json=destinationName,proto3" json:"destination_name,omitempty"`
	// contains filtered or unexported fields
}

func (*RenameRequest) Descriptor deprecated added in v1.6.0

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

Deprecated: Use RenameRequest.ProtoReflect.Descriptor instead.

func (*RenameRequest) GetDestinationName added in v1.6.0

func (x *RenameRequest) GetDestinationName() string

func (*RenameRequest) GetOriginalName added in v1.6.0

func (x *RenameRequest) GetOriginalName() string

func (*RenameRequest) ProtoMessage added in v1.6.0

func (*RenameRequest) ProtoMessage()

func (*RenameRequest) ProtoReflect added in v1.6.0

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

func (*RenameRequest) Reset added in v1.6.0

func (x *RenameRequest) Reset()

func (*RenameRequest) String added in v1.6.0

func (x *RenameRequest) String() string

type RmManyResponse

type RmManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

RmManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type RmRequest

type RmRequest struct {

	// The fully qualified path to the file to remove.
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// contains filtered or unexported fields
}

func (*RmRequest) Descriptor deprecated

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

Deprecated: Use RmRequest.ProtoReflect.Descriptor instead.

func (*RmRequest) GetFilename

func (x *RmRequest) GetFilename() string

func (*RmRequest) ProtoMessage

func (*RmRequest) ProtoMessage()

func (*RmRequest) ProtoReflect

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

func (*RmRequest) Reset

func (x *RmRequest) Reset()

func (*RmRequest) String

func (x *RmRequest) String() string

type RmdirManyResponse

type RmdirManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

RmdirManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type RmdirRequest

type RmdirRequest struct {

	// The fully qualified path to the directory to remove.
	// Must be empty of any entries.
	Directory string `protobuf:"bytes,1,opt,name=directory,proto3" json:"directory,omitempty"`
	// contains filtered or unexported fields
}

func (*RmdirRequest) Descriptor deprecated

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

Deprecated: Use RmdirRequest.ProtoReflect.Descriptor instead.

func (*RmdirRequest) GetDirectory

func (x *RmdirRequest) GetDirectory() string

func (*RmdirRequest) ProtoMessage

func (*RmdirRequest) ProtoMessage()

func (*RmdirRequest) ProtoReflect

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

func (*RmdirRequest) Reset

func (x *RmdirRequest) Reset()

func (*RmdirRequest) String

func (x *RmdirRequest) String() string

type SetFileAttributesManyResponse

type SetFileAttributesManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

SetFileAttributesManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type SetFileAttributesRequest

type SetFileAttributesRequest struct {
	Attrs *FileAttributes `protobuf:"bytes,1,opt,name=attrs,proto3" json:"attrs,omitempty"`
	// contains filtered or unexported fields
}

SetFileAttributesRequest processes attrs and attempts to set the path given to those attributes. As this is N steps (owner, group, permissions, etc) it is not transactional and can leave an entity in a partial state if errors occur.

func (*SetFileAttributesRequest) Descriptor deprecated

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

Deprecated: Use SetFileAttributesRequest.ProtoReflect.Descriptor instead.

func (*SetFileAttributesRequest) GetAttrs

func (*SetFileAttributesRequest) ProtoMessage

func (*SetFileAttributesRequest) ProtoMessage()

func (*SetFileAttributesRequest) ProtoReflect

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

func (*SetFileAttributesRequest) Reset

func (x *SetFileAttributesRequest) Reset()

func (*SetFileAttributesRequest) String

func (x *SetFileAttributesRequest) String() string

type StatManyResponse

type StatManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *StatReply
	Error error
}

StatManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type StatReply

type StatReply struct {

	// The file path, as provided in StatRequest
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// size of the file, in bytes
	Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// NB: the file mode here is represented using Go's fs.FileMode scheme
	// which combines permissions with additional data such as the type
	// (directory, symlink, etc)
	Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"`
	// File modification time
	Modtime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=modtime,proto3" json:"modtime,omitempty"`
	// UID of owner
	Uid uint32 `protobuf:"varint,5,opt,name=uid,proto3" json:"uid,omitempty"`
	// GID of owner
	Gid uint32 `protobuf:"varint,6,opt,name=gid,proto3" json:"gid,omitempty"`
	// Whether the immutable flag is set.
	// This only applies to systems which support immutable file bits.
	// For systems which support multiple types (OS/X) this refers
	// only to system level immutability and not user. i.e. even root
	// is unable to modify these files.
	Immutable bool `protobuf:"varint,7,opt,name=immutable,proto3" json:"immutable,omitempty"`
	// contains filtered or unexported fields
}

StatReply contains stat information for a single file.

func (*StatReply) Descriptor deprecated

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

Deprecated: Use StatReply.ProtoReflect.Descriptor instead.

func (*StatReply) GetFilename

func (x *StatReply) GetFilename() string

func (*StatReply) GetGid

func (x *StatReply) GetGid() uint32

func (*StatReply) GetImmutable

func (x *StatReply) GetImmutable() bool

func (*StatReply) GetMode

func (x *StatReply) GetMode() uint32

func (*StatReply) GetModtime

func (x *StatReply) GetModtime() *timestamppb.Timestamp

func (*StatReply) GetSize

func (x *StatReply) GetSize() int64

func (*StatReply) GetUid

func (x *StatReply) GetUid() uint32

func (*StatReply) ProtoMessage

func (*StatReply) ProtoMessage()

func (*StatReply) ProtoReflect

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

func (*StatReply) Reset

func (x *StatReply) Reset()

func (*StatReply) String

func (x *StatReply) String() string

type StatRequest

type StatRequest struct {

	// absolute path to the target file
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// If true, use stat instead of lstat so that symlinks are followed
	FollowLinks bool `protobuf:"varint,2,opt,name=follow_links,json=followLinks,proto3" json:"follow_links,omitempty"`
	// contains filtered or unexported fields
}

StatRequest specifies the filename for which to retrieve metadata.

func (*StatRequest) Descriptor deprecated

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

Deprecated: Use StatRequest.ProtoReflect.Descriptor instead.

func (*StatRequest) GetFilename

func (x *StatRequest) GetFilename() string
func (x *StatRequest) GetFollowLinks() bool

func (*StatRequest) ProtoMessage

func (*StatRequest) ProtoMessage()

func (*StatRequest) ProtoReflect

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

func (*StatRequest) Reset

func (x *StatRequest) Reset()

func (*StatRequest) String

func (x *StatRequest) String() string

type SumManyResponse

type SumManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *SumReply
	Error error
}

SumManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type SumReply

type SumReply struct {

	// Filename, as provided in SumRequest
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// The type of sum used to calculate `sum`
	SumType SumType `protobuf:"varint,2,opt,name=sum_type,json=sumType,proto3,enum=LocalFile.SumType" json:"sum_type,omitempty"`
	// The sum value, as a hex-encoded string
	Sum string `protobuf:"bytes,3,opt,name=sum,proto3" json:"sum,omitempty"`
	// contains filtered or unexported fields
}

SumReply contains the sum output for the given filename.

func (*SumReply) Descriptor deprecated

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

Deprecated: Use SumReply.ProtoReflect.Descriptor instead.

func (*SumReply) GetFilename

func (x *SumReply) GetFilename() string

func (*SumReply) GetSum

func (x *SumReply) GetSum() string

func (*SumReply) GetSumType

func (x *SumReply) GetSumType() SumType

func (*SumReply) ProtoMessage

func (*SumReply) ProtoMessage()

func (*SumReply) ProtoReflect

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

func (*SumReply) Reset

func (x *SumReply) Reset()

func (*SumReply) String

func (x *SumReply) String() string

type SumRequest

type SumRequest struct {

	// Absoloute path to the target file.
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// The requested sum type. If not set, or SUM_TYPE_UNKNOWN,
	// an implementation-default value will be chosen automatically,
	// and indicated in the reply.
	SumType SumType `protobuf:"varint,2,opt,name=sum_type,json=sumType,proto3,enum=LocalFile.SumType" json:"sum_type,omitempty"`
	// contains filtered or unexported fields
}

SumRequest specifies a type and filename for a sum operation.

func (*SumRequest) Descriptor deprecated

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

Deprecated: Use SumRequest.ProtoReflect.Descriptor instead.

func (*SumRequest) GetFilename

func (x *SumRequest) GetFilename() string

func (*SumRequest) GetSumType

func (x *SumRequest) GetSumType() SumType

func (*SumRequest) ProtoMessage

func (*SumRequest) ProtoMessage()

func (*SumRequest) ProtoReflect

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

func (*SumRequest) Reset

func (x *SumRequest) Reset()

func (*SumRequest) String

func (x *SumRequest) String() string

type SumType

type SumType int32

SumType specifies a hashing function to use when calculating file sums.

const (
	SumType_SUM_TYPE_UNKNOWN    SumType = 0
	SumType_SUM_TYPE_CRC32IEEE  SumType = 1
	SumType_SUM_TYPE_MD5        SumType = 2
	SumType_SUM_TYPE_SHA256     SumType = 3
	SumType_SUM_TYPE_SHA512_256 SumType = 4
)

func (SumType) Descriptor

func (SumType) Descriptor() protoreflect.EnumDescriptor

func (SumType) Enum

func (x SumType) Enum() *SumType

func (SumType) EnumDescriptor deprecated

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

Deprecated: Use SumType.Descriptor instead.

func (SumType) Number

func (x SumType) Number() protoreflect.EnumNumber

func (SumType) String

func (x SumType) String() string

func (SumType) Type

func (SumType) Type() protoreflect.EnumType

type SymlinkManyResponse added in v1.19.0

type SymlinkManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

SymlinkManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type SymlinkRequest added in v1.19.0

type SymlinkRequest struct {
	Target   string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	Linkname string `protobuf:"bytes,2,opt,name=linkname,proto3" json:"linkname,omitempty"`
	// contains filtered or unexported fields
}

func (*SymlinkRequest) Descriptor deprecated added in v1.19.0

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

Deprecated: Use SymlinkRequest.ProtoReflect.Descriptor instead.

func (*SymlinkRequest) GetLinkname added in v1.19.0

func (x *SymlinkRequest) GetLinkname() string

func (*SymlinkRequest) GetTarget added in v1.19.0

func (x *SymlinkRequest) GetTarget() string

func (*SymlinkRequest) ProtoMessage added in v1.19.0

func (*SymlinkRequest) ProtoMessage()

func (*SymlinkRequest) ProtoReflect added in v1.19.0

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

func (*SymlinkRequest) Reset added in v1.19.0

func (x *SymlinkRequest) Reset()

func (*SymlinkRequest) String added in v1.19.0

func (x *SymlinkRequest) String() string

type TailRequest

type TailRequest struct {
	Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	// If non-zero skip N bytes into the file before returning data.
	// Negative implies based from end of file.
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

TailRequest describes the filename to be tailed.

func (*TailRequest) Descriptor deprecated

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

Deprecated: Use TailRequest.ProtoReflect.Descriptor instead.

func (*TailRequest) GetFilename

func (x *TailRequest) GetFilename() string

func (*TailRequest) GetOffset

func (x *TailRequest) GetOffset() int64

func (*TailRequest) ProtoMessage

func (*TailRequest) ProtoMessage()

func (*TailRequest) ProtoReflect

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

func (*TailRequest) Reset

func (x *TailRequest) Reset()

func (*TailRequest) String

func (x *TailRequest) String() string

type UnimplementedLocalFileServer

type UnimplementedLocalFileServer struct{}

UnimplementedLocalFileServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedLocalFileServer) Copy

func (UnimplementedLocalFileServer) DataGet added in v1.37.0

func (UnimplementedLocalFileServer) DataSet added in v1.37.0

func (UnimplementedLocalFileServer) List

func (UnimplementedLocalFileServer) Mkdir added in v1.22.0

func (UnimplementedLocalFileServer) Read

func (UnimplementedLocalFileServer) Rename added in v1.6.0

func (UnimplementedLocalFileServer) Rm

func (UnimplementedLocalFileServer) Rmdir

func (UnimplementedLocalFileServer) SetFileAttributes

func (UnimplementedLocalFileServer) Stat

func (UnimplementedLocalFileServer) Sum

func (UnimplementedLocalFileServer) Write

type UnsafeLocalFileServer

type UnsafeLocalFileServer interface {
	// contains filtered or unexported methods
}

UnsafeLocalFileServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LocalFileServer will result in compilation errors.

type WriteManyResponse

type WriteManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

WriteManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type WriteRequest

type WriteRequest struct {

	// Types that are assignable to Request:
	//
	//	*WriteRequest_Description
	//	*WriteRequest_Contents
	Request isWriteRequest_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

WriteRequest streams the data for the filename to be written. The first request must contain a description and all future requests must contain contents. Each write request will append contents into the file until the stream is closed. Then the file is moved to it's final location.

func (*WriteRequest) Descriptor deprecated

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

Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.

func (*WriteRequest) GetContents

func (x *WriteRequest) GetContents() []byte

func (*WriteRequest) GetDescription

func (x *WriteRequest) GetDescription() *FileWrite

func (*WriteRequest) GetRequest

func (m *WriteRequest) GetRequest() isWriteRequest_Request

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) ProtoReflect

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

func (*WriteRequest) Reset

func (x *WriteRequest) Reset()

func (*WriteRequest) String

func (x *WriteRequest) String() string

type WriteRequest_Contents

type WriteRequest_Contents struct {
	Contents []byte `protobuf:"bytes,2,opt,name=contents,proto3,oneof"`
}

type WriteRequest_Description

type WriteRequest_Description struct {
	Description *FileWrite `protobuf:"bytes,1,opt,name=description,proto3,oneof"`
}

Directories

Path Synopsis
Package client provides the client interface for 'file'
Package client provides the client interface for 'file'
Package server implements the sansshell 'LocalFile' service.
Package server implements the sansshell 'LocalFile' service.

Jump to

Keyboard shortcuts

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