bbfs

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 9 Imported by: 1

README

BBFS

A golang FS implementation for Bitbucket Data Center.

It currently only supports the Bitbucket Data Center API. The Cloud version is under development.

References

Documentation

Overview

bbfs is a fs.FS implementation for a Bitbucket server, on premises.

Index

Constants

View Source
const (
	// Default api path for Bitbucket Server
	ApiPath = "/rest/api"
	// API version
	DefaultVersion = "latest"
)

Variables

View Source
var (
	ErrNotImplementedYet = errors.New("not implemented yet")
)

Functions

func NewFS

func NewFS(cfg *Config, opts ...Option) fs.FS

NewFS returns a new FS.

Types

type Bitbucket

type Bitbucket interface {
}

Define the interface for accessing the Bitbucket repositories.

type Config

type Config struct {
	// Host is the hostname of the server
	Host string
	// ProjectKey is the name of the project or the user of the repo
	ProjectKey string
	// RepositorySlug is the name of the repository
	RepositorySlug string
	// Root is the root of the file system in the repo,
	// must be a an existing directory
	Root string
	// AccessKey is an http access key for the repo or the project
	AccessKey string
	// At is a branch, tag or commit
	At string
	// ApiVersion is ignored
	ApiVersion string
}

Config contains the configuration for a bitbucket file system.

type Option

type Option func(*bbFS)

Options is the type for NewFS options.

func WithDisabledCache added in v0.0.5

func WithDisabledCache() Option

WithDisabledCache disables caching the requests to bitbucket

func WithLogger

func WithLogger(l *slog.Logger) Option

WithLogger adds a logger to the FS.

func WithMaxCachedItemSize added in v0.0.5

func WithMaxCachedItemSize(size int64) Option

WithMaxCachedItemSize sets the maximum size for items in the cache.

Directories

Path Synopsis
bbclient exposes services to interact with a Bitbucket repository.
bbclient exposes services to interact with a Bitbucket repository.
cloud
cloud does not work yet, do not use
cloud does not work yet, do not use
nullog contains a handler that logs nohing and is always disabled.
nullog contains a handler that logs nohing and is always disabled.

Jump to

Keyboard shortcuts

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