Documentation ¶
Overview ¶
package cdr provides Common Data Refs
Index ¶
- Variables
- func IsImmutable(ref *Ref) bool
- func MaxSize(ref *Ref) int64
- func MinSize(ref *Ref) int64
- type Cipher
- func (*Cipher) Descriptor() ([]byte, []int)deprecated
- func (x *Cipher) GetAlgo() CipherAlgo
- func (x *Cipher) GetInner() *Ref
- func (x *Cipher) GetKey() []byte
- func (x *Cipher) GetNonce() []byte
- func (*Cipher) ProtoMessage()
- func (x *Cipher) ProtoReflect() protoreflect.Message
- func (x *Cipher) Reset()
- func (x *Cipher) String() string
- type CipherAlgo
- type Compress
- type CompressAlgo
- func (CompressAlgo) Descriptor() protoreflect.EnumDescriptor
- func (x CompressAlgo) Enum() *CompressAlgo
- func (CompressAlgo) EnumDescriptor() ([]byte, []int)deprecated
- func (x CompressAlgo) Number() protoreflect.EnumNumber
- func (x CompressAlgo) String() string
- func (CompressAlgo) Type() protoreflect.EnumType
- type Concat
- type ContentHash
- func (*ContentHash) Descriptor() ([]byte, []int)deprecated
- func (x *ContentHash) GetAlgo() HashAlgo
- func (x *ContentHash) GetHash() []byte
- func (x *ContentHash) GetInner() *Ref
- func (*ContentHash) ProtoMessage()
- func (x *ContentHash) ProtoReflect() protoreflect.Message
- func (x *ContentHash) Reset()
- func (x *ContentHash) String() string
- type Creator
- type HTTP
- type HashAlgo
- type Middleware
- type Option
- type PostFunc
- type Ref
- func CompressGzip(ctx context.Context, in []byte, next PostFunc) (*Ref, error)
- func CreateAWSRef(ctx context.Context, client interface{}, bucket, key string, ttl time.Duration) (*Ref, error)
- func CreateAzureRef(ctx context.Context, client interface{}, bucket, key string, ttl time.Duration) (*Ref, error)
- func CreateConcatRef(refs []*Ref) *Ref
- func CreateGCSRef(ctx context.Context, client interface{}, bucket, key string, ttl time.Duration) (*Ref, error)
- func CreateHTTPRef(url string, headers map[string]string) *Ref
- func CreateMinioRef(ctx context.Context, client *minio.Client, bucket, key string, ...) (*Ref, error)
- func CreateSliceRef(x *Ref, start, end uint64) *Ref
- func EncryptChaCha20(ctx context.Context, data []byte, next PostFunc) (*Ref, error)
- func HashBlake2b256(ctx context.Context, in []byte, next PostFunc) (*Ref, error)
- func (*Ref) Descriptor() ([]byte, []int)deprecated
- func (m *Ref) GetBody() isRef_Body
- func (x *Ref) GetCipher() *Cipher
- func (x *Ref) GetCompress() *Compress
- func (x *Ref) GetConcat() *Concat
- func (x *Ref) GetContentHash() *ContentHash
- func (x *Ref) GetHttp() *HTTP
- func (x *Ref) GetSizeLimits() *SizeLimits
- func (x *Ref) GetSlice() *Slice
- func (r *Ref) MarshalBase64() []byte
- func (*Ref) ProtoMessage()
- func (x *Ref) ProtoReflect() protoreflect.Message
- func (x *Ref) Reset()
- func (x *Ref) String() string
- func (r *Ref) UnmarshalBase64(x []byte) error
- type Ref_Cipher
- type Ref_Compress
- type Ref_Concat
- type Ref_ContentHash
- type Ref_Http
- type Ref_SizeLimits
- type Ref_Slice
- type Resolver
- type SizeLimits
- func (*SizeLimits) Descriptor() ([]byte, []int)deprecated
- func (x *SizeLimits) GetInner() *Ref
- func (x *SizeLimits) GetMax() int64
- func (x *SizeLimits) GetMin() int64
- func (*SizeLimits) ProtoMessage()
- func (x *SizeLimits) ProtoReflect() protoreflect.Message
- func (x *SizeLimits) Reset()
- func (x *SizeLimits) String() string
- type Slice
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HashAlgo_name = map[int32]string{ 0: "UNKNOWN_HASH", 45600: "BLAKE2b_256", } HashAlgo_value = map[string]int32{ "UNKNOWN_HASH": 0, "BLAKE2b_256": 45600, } )
Enum value maps for HashAlgo.
View Source
var ( CipherAlgo_name = map[int32]string{ 0: "UNKNOWN_CIPHER", 1: "CHACHA20", } CipherAlgo_value = map[string]int32{ "UNKNOWN_CIPHER": 0, "CHACHA20": 1, } )
Enum value maps for CipherAlgo.
View Source
var ( CompressAlgo_name = map[int32]string{ 0: "UNKNOWN_COMPRESS", 1: "GZIP", } CompressAlgo_value = map[string]int32{ "UNKNOWN_COMPRESS": 0, "GZIP": 1, } )
Enum value maps for CompressAlgo.
View Source
var File_cdr_proto protoreflect.FileDescriptor
Functions ¶
func IsImmutable ¶
Types ¶
type Cipher ¶
type Cipher struct { Inner *Ref `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` Algo CipherAlgo `protobuf:"varint,2,opt,name=algo,proto3,enum=pachyderm.cdr.CipherAlgo" json:"algo,omitempty"` Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` Nonce []byte `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` // contains filtered or unexported fields }
1:1 Transforms
func (*Cipher) Descriptor
deprecated
func (*Cipher) GetAlgo ¶
func (x *Cipher) GetAlgo() CipherAlgo
func (*Cipher) ProtoMessage ¶
func (*Cipher) ProtoMessage()
func (*Cipher) ProtoReflect ¶
func (x *Cipher) ProtoReflect() protoreflect.Message
type CipherAlgo ¶
type CipherAlgo int32
const ( CipherAlgo_UNKNOWN_CIPHER CipherAlgo = 0 CipherAlgo_CHACHA20 CipherAlgo = 1 )
func (CipherAlgo) Descriptor ¶
func (CipherAlgo) Descriptor() protoreflect.EnumDescriptor
func (CipherAlgo) Enum ¶
func (x CipherAlgo) Enum() *CipherAlgo
func (CipherAlgo) EnumDescriptor
deprecated
func (CipherAlgo) EnumDescriptor() ([]byte, []int)
Deprecated: Use CipherAlgo.Descriptor instead.
func (CipherAlgo) Number ¶
func (x CipherAlgo) Number() protoreflect.EnumNumber
func (CipherAlgo) String ¶
func (x CipherAlgo) String() string
func (CipherAlgo) Type ¶
func (CipherAlgo) Type() protoreflect.EnumType
type Compress ¶
type Compress struct { Inner *Ref `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` Algo CompressAlgo `protobuf:"varint,2,opt,name=algo,proto3,enum=pachyderm.cdr.CompressAlgo" json:"algo,omitempty"` // contains filtered or unexported fields }
func (*Compress) Descriptor
deprecated
func (*Compress) GetAlgo ¶
func (x *Compress) GetAlgo() CompressAlgo
func (*Compress) ProtoMessage ¶
func (*Compress) ProtoMessage()
func (*Compress) ProtoReflect ¶
func (x *Compress) ProtoReflect() protoreflect.Message
type CompressAlgo ¶
type CompressAlgo int32
const ( CompressAlgo_UNKNOWN_COMPRESS CompressAlgo = 0 CompressAlgo_GZIP CompressAlgo = 1 )
func (CompressAlgo) Descriptor ¶
func (CompressAlgo) Descriptor() protoreflect.EnumDescriptor
func (CompressAlgo) Enum ¶
func (x CompressAlgo) Enum() *CompressAlgo
func (CompressAlgo) EnumDescriptor
deprecated
func (CompressAlgo) EnumDescriptor() ([]byte, []int)
Deprecated: Use CompressAlgo.Descriptor instead.
func (CompressAlgo) Number ¶
func (x CompressAlgo) Number() protoreflect.EnumNumber
func (CompressAlgo) String ¶
func (x CompressAlgo) String() string
func (CompressAlgo) Type ¶
func (CompressAlgo) Type() protoreflect.EnumType
type Concat ¶
type Concat struct { Refs []*Ref `protobuf:"bytes,1,rep,name=refs,proto3" json:"refs,omitempty"` // contains filtered or unexported fields }
Many:1 Transforms
func (*Concat) Descriptor
deprecated
func (*Concat) ProtoMessage ¶
func (*Concat) ProtoMessage()
func (*Concat) ProtoReflect ¶
func (x *Concat) ProtoReflect() protoreflect.Message
type ContentHash ¶
type ContentHash struct { Inner *Ref `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` Algo HashAlgo `protobuf:"varint,2,opt,name=algo,proto3,enum=pachyderm.cdr.HashAlgo" json:"algo,omitempty"` Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
Contraints
func (*ContentHash) Descriptor
deprecated
func (*ContentHash) Descriptor() ([]byte, []int)
Deprecated: Use ContentHash.ProtoReflect.Descriptor instead.
func (*ContentHash) GetAlgo ¶
func (x *ContentHash) GetAlgo() HashAlgo
func (*ContentHash) GetHash ¶
func (x *ContentHash) GetHash() []byte
func (*ContentHash) GetInner ¶
func (x *ContentHash) GetInner() *Ref
func (*ContentHash) ProtoMessage ¶
func (*ContentHash) ProtoMessage()
func (*ContentHash) ProtoReflect ¶
func (x *ContentHash) ProtoReflect() protoreflect.Message
func (*ContentHash) Reset ¶
func (x *ContentHash) Reset()
func (*ContentHash) String ¶
func (x *ContentHash) String() string
type Creator ¶
type Creator struct {
// contains filtered or unexported fields
}
func NewCreator ¶
func NewCreator(layers []Middleware, postFunc PostFunc) *Creator
type HTTP ¶
type HTTP struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*HTTP) Descriptor
deprecated
func (*HTTP) GetHeaders ¶
func (*HTTP) ProtoMessage ¶
func (*HTTP) ProtoMessage()
func (*HTTP) ProtoReflect ¶
func (x *HTTP) ProtoReflect() protoreflect.Message
type HashAlgo ¶
type HashAlgo int32
Uses numeric values from this table https://github.com/multiformats/multicodec/blob/master/table.csv
func (HashAlgo) Descriptor ¶
func (HashAlgo) Descriptor() protoreflect.EnumDescriptor
func (HashAlgo) EnumDescriptor
deprecated
func (HashAlgo) Number ¶
func (x HashAlgo) Number() protoreflect.EnumNumber
func (HashAlgo) Type ¶
func (HashAlgo) Type() protoreflect.EnumType
type Middleware ¶
type Ref ¶
type Ref struct { // Types that are assignable to Body: // *Ref_Http // *Ref_ContentHash // *Ref_SizeLimits // *Ref_Cipher // *Ref_Compress // *Ref_Slice // *Ref_Concat Body isRef_Body `protobuf_oneof:"body"` // contains filtered or unexported fields }
func CreateAWSRef ¶
func CreateAzureRef ¶
func CreateConcatRef ¶
func CreateGCSRef ¶
func CreateMinioRef ¶
func CreateSliceRef ¶
func EncryptChaCha20 ¶
EncryptChaCha20 encrypts the data with a random key (stored in the ref) Does not protect the data from tampering.
func HashBlake2b256 ¶
func (*Ref) Descriptor
deprecated
func (*Ref) GetCompress ¶
func (*Ref) GetContentHash ¶
func (x *Ref) GetContentHash() *ContentHash
func (*Ref) GetSizeLimits ¶
func (x *Ref) GetSizeLimits() *SizeLimits
func (*Ref) MarshalBase64 ¶
func (*Ref) ProtoMessage ¶
func (*Ref) ProtoMessage()
func (*Ref) ProtoReflect ¶
func (x *Ref) ProtoReflect() protoreflect.Message
func (*Ref) UnmarshalBase64 ¶
type Ref_Cipher ¶
type Ref_Cipher struct { // 1:1 Transforms Cipher *Cipher `protobuf:"bytes,64,opt,name=cipher,proto3,oneof"` }
type Ref_Compress ¶
type Ref_Compress struct {
Compress *Compress `protobuf:"bytes,65,opt,name=compress,proto3,oneof"`
}
type Ref_Concat ¶
type Ref_Concat struct { // Many:1 Transforms Concat *Concat `protobuf:"bytes,96,opt,name=concat,proto3,oneof"` }
type Ref_ContentHash ¶
type Ref_ContentHash struct { // Constraints ContentHash *ContentHash `protobuf:"bytes,32,opt,name=content_hash,json=contentHash,proto3,oneof"` }
type Ref_Http ¶
type Ref_Http struct { // Sources Http *HTTP `protobuf:"bytes,1,opt,name=http,proto3,oneof"` }
type Ref_SizeLimits ¶
type Ref_SizeLimits struct {
SizeLimits *SizeLimits `protobuf:"bytes,33,opt,name=size_limits,json=sizeLimits,proto3,oneof"`
}
type Ref_Slice ¶
type Ref_Slice struct {
Slice *Slice `protobuf:"bytes,66,opt,name=slice,proto3,oneof"`
}
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
type SizeLimits ¶
type SizeLimits struct { Inner *Ref `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` Min int64 `protobuf:"varint,2,opt,name=min,proto3" json:"min,omitempty"` Max int64 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"` // contains filtered or unexported fields }
func (*SizeLimits) Descriptor
deprecated
func (*SizeLimits) Descriptor() ([]byte, []int)
Deprecated: Use SizeLimits.ProtoReflect.Descriptor instead.
func (*SizeLimits) GetInner ¶
func (x *SizeLimits) GetInner() *Ref
func (*SizeLimits) GetMax ¶
func (x *SizeLimits) GetMax() int64
func (*SizeLimits) GetMin ¶
func (x *SizeLimits) GetMin() int64
func (*SizeLimits) ProtoMessage ¶
func (*SizeLimits) ProtoMessage()
func (*SizeLimits) ProtoReflect ¶
func (x *SizeLimits) ProtoReflect() protoreflect.Message
func (*SizeLimits) Reset ¶
func (x *SizeLimits) Reset()
func (*SizeLimits) String ¶
func (x *SizeLimits) String() string
type Slice ¶
type Slice struct { Inner *Ref `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` Start uint64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` End uint64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
1:1 Transforms
func (*Slice) Descriptor
deprecated
func (*Slice) ProtoMessage ¶
func (*Slice) ProtoMessage()
func (*Slice) ProtoReflect ¶
func (x *Slice) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.