Documentation
¶
Index ¶
- Constants
- func LoadAndSetACLs(ctx context.Context, prov remote.RemoteCloser, aclFilePath string) error
- func NewACLServer(server remote.RemoteCloser, evaluator *remote.ACLEvaluator) remote.RemoteCloser
- type ACLServer
- func (s *ACLServer) AddMapResult(ctx context.Context, from remote.Hash, to remote.Hash) error
- func (s *ACLServer) GetRefs(ctx context.Context, server string, project string, refs []string) ([]entities.Hash, error)
- func (s *ACLServer) PutRefs(ctx context.Context, server string, project string, refs []entities.RefHash) error
- func (s *ACLServer) SearchRefs(ctx context.Context, server string, project string, refPrefix string, ...) ([]entities.ProjectRefHash, error)
- type Hash
- type LoggingServer
- func (s *LoggingServer) AddMapResult(ctx context.Context, from remote.Hash, to remote.Hash) error
- func (s *LoggingServer) Close() error
- func (s *LoggingServer) GetObject(ctx context.Context, key remote.Hash) (remote.ContentReadCloser, error)
- func (s *LoggingServer) GetRefs(ctx context.Context, server string, project string, refs []string) ([]remote.Hash, error)
- func (s *LoggingServer) Headers(ctx context.Context, keys []remote.Hash) ([]entities.ObjectHeader, error)
- func (s *LoggingServer) MapResults(ctx context.Context, from remote.Hash) ([]remote.Hash, error)
- func (s *LoggingServer) Mark(ctx context.Context, hash remote.Hash, key string, value string) (int64, error)
- func (s *LoggingServer) PutObject(ctx context.Context, key remote.Hash, reader remote.ContentReadCloser) error
- func (s *LoggingServer) PutRefs(ctx context.Context, server string, project string, refs []remote.RefHash) error
- func (s *LoggingServer) SHA256(ctx context.Context, keys []remote.Hash) ([]entities.SHA256, error)
- func (s *LoggingServer) SearchRefs(ctx context.Context, server string, project string, refPrefix string, ...) ([]remote.ProjectRefHash, error)
- func (s *LoggingServer) Version(ctx context.Context) (string, error)
- func (s *LoggingServer) WhoAmI(ctx context.Context) (string, error)
- type New
- type NoHashValidation
- type NoLinkValidation
- type ServerOpt
- type ZstdCompressor
Constants ¶
const ClientMinVersion = "0.1.2"
const ServerVersion = "0.1.1"
Variables ¶
This section is empty.
Functions ¶
func LoadAndSetACLs ¶
LoadAndSetACLs reads the specified ACL bootstrap JSON file and applies the entries. Note: This behavior is declarative on a per-file level. Other files in the ACL directory tree that are not mentioned in the bootstrap file are left completely untouched. However, any specific file mentioned in the bootstrap file will have its content completely overwritten by the new definition.
func NewACLServer ¶
func NewACLServer(server remote.RemoteCloser, evaluator *remote.ACLEvaluator) remote.RemoteCloser
Types ¶
type ACLServer ¶
type ACLServer struct {
remote.RemoteCloser
// contains filtered or unexported fields
}
func (*ACLServer) AddMapResult ¶
type LoggingServer ¶
type LoggingServer struct {
// contains filtered or unexported fields
}
func NewLoggingServer ¶
func NewLoggingServer(server remote.RemoteCloser, log *log.Logger, maxItemsToList int, samplingRate float64) *LoggingServer
func (*LoggingServer) AddMapResult ¶
AddMapResult implements remote.RemoteProvider.
func (*LoggingServer) Close ¶
func (s *LoggingServer) Close() error
Close implements remote.RemoteCloser.
func (*LoggingServer) GetObject ¶
func (s *LoggingServer) GetObject(ctx context.Context, key remote.Hash) (remote.ContentReadCloser, error)
GetObject implements remote.RemoteProvider.
func (*LoggingServer) GetRefs ¶
func (s *LoggingServer) GetRefs(ctx context.Context, server string, project string, refs []string) ([]remote.Hash, error)
GetRefs implements remote.RemoteProvider.
func (*LoggingServer) Headers ¶
func (s *LoggingServer) Headers(ctx context.Context, keys []remote.Hash) ([]entities.ObjectHeader, error)
Headers implements remote.RemoteProvider.
func (*LoggingServer) MapResults ¶
MapResults implements remote.RemoteProvider.
func (*LoggingServer) Mark ¶
func (s *LoggingServer) Mark(ctx context.Context, hash remote.Hash, key string, value string) (int64, error)
Mark implements remote.RemoteProvider.
func (*LoggingServer) PutObject ¶
func (s *LoggingServer) PutObject(ctx context.Context, key remote.Hash, reader remote.ContentReadCloser) error
PutObject implements remote.RemoteProvider.
func (*LoggingServer) PutRefs ¶
func (s *LoggingServer) PutRefs(ctx context.Context, server string, project string, refs []remote.RefHash) error
PutRefs implements remote.RemoteProvider.
func (*LoggingServer) SearchRefs ¶
func (s *LoggingServer) SearchRefs(ctx context.Context, server string, project string, refPrefix string, limit int) ([]remote.ProjectRefHash, error)
SearchRefs implements remote.RemoteProvider.
type NoHashValidation ¶
type NoHashValidation struct {
Value bool
}
type NoLinkValidation ¶
type NoLinkValidation struct {
Value bool
}
type ZstdCompressor ¶
type ZstdCompressor struct{}
func (*ZstdCompressor) Decompress ¶
func (*ZstdCompressor) Decompress(buf []byte) ([]byte, error)
func (*ZstdCompressor) NewReader ¶
func (*ZstdCompressor) NewReader(r io.Reader) io.ReadCloser