Versions in this module Expand all Collapse all v0 v0.5.3 Feb 3, 2019 Changes in this version + func RegisterDownloadManagerOnMux(d DownloadManager, mux *http.ServeMux) + func RegisterLargeFileManagerOnMux(f LargeFileManager, mux *http.ServeMux) + func RegisterServerOnMux(ctx context.Context, srv *Server, mux *http.ServeMux) error + func RegisterSimpleFileManagerOnMux(f SimpleFileManager, mux *http.ServeMux) + type AccountManager interface + APIRoot func(acct string) string + Authorize func(acct, key string) (string, error) + CheckCreds func(token, api string) error + DownloadRoot func(acct string) string + Sizes func(acct string) (recommended, minimum int32) + UploadHost func(id string) (string, error) + UploadPartHost func(fileID string) (string, error) + type BucketManager interface + AddBucket func(id, name string, bs []byte) error + GetBucket func(id string) ([]byte, error) + ListBuckets func(acct string) ([][]byte, error) + RemoveBucket func(id string) error + UpdateBucket func(id string, rev int, bs []byte) error + type DownloadManager interface + GetBucket func(id string) ([]byte, error) + GetBucketID func(bucket string) (string, error) + ObjectByName func(bucketID, name string) (DownloadableObject, error) + type DownloadableObject interface + Reader func() io.ReaderAt + Size func() int64 + type LargeFileManager interface + PartWriter func(id string, part int) (io.WriteCloser, error) + type LargeFileOrganizer interface + Finish func(fileID string) error + Get func(fileID string) ([]byte, error) + Parts func(fileID string) ([]string, error) + Start func(bucketID, fileName, fileID string, bs []byte) error + type ListManager interface + NextN func(bucketID, fileName, withPrefix, skipPrefix string, n int) ([]VersionedObject, error) + type Server struct + Account AccountManager + Bucket BucketManager + LargeFile LargeFileOrganizer + List ListManager + func (s *Server) AuthorizeAccount(ctx context.Context, req *pb.AuthorizeAccountRequest) (*pb.AuthorizeAccountResponse, error) + func (s *Server) CreateBucket(ctx context.Context, req *pb.Bucket) (*pb.Bucket, error) + func (s *Server) DeleteBucket(ctx context.Context, req *pb.Bucket) (*pb.Bucket, error) + func (s *Server) FinishLargeFile(ctx context.Context, req *pb.FinishLargeFileRequest) (*pb.FinishLargeFileResponse, error) + func (s *Server) GetUploadPartUrl(ctx context.Context, req *pb.GetUploadPartUrlRequest) (*pb.GetUploadPartUrlResponse, error) + func (s *Server) GetUploadUrl(ctx context.Context, req *pb.GetUploadUrlRequest) (*pb.GetUploadUrlResponse, error) + func (s *Server) ListBuckets(ctx context.Context, req *pb.ListBucketsRequest) (*pb.ListBucketsResponse, error) + func (s *Server) ListFileVersions(ctx context.Context, req *pb.ListFileVersionsRequest) (*pb.ListFileVersionsResponse, error) + func (s *Server) StartLargeFile(ctx context.Context, req *pb.StartLargeFileRequest) (*pb.StartLargeFileResponse, error) + type SimpleFileManager interface + Writer func(bucket, name, id string) (io.WriteCloser, error) + type VersionedObject interface + Name func() string + NextNVersions func(begin string, n int) ([]string, error)