Documentation
¶
Overview ¶
Package server runs a throwaway Passbolt in Docker for integration tests.
Keep identical to internal/e2e/server/server.go in go-passbolt.
Index ¶
- Constants
- func PassboltImage() string
- type Credentials
- type Passbolt
- func (p *Passbolt) Close(ctx context.Context) error
- func (p *Passbolt) CreateUser(ctx context.Context, email, first, last, role, password string) (Credentials, error)
- func (p *Passbolt) EnableV5Resources(ctx context.Context, admin Credentials) error
- func (p *Passbolt) RegisterUser(ctx context.Context, email, first, last, role string) (userID, token string, err error)
Constants ¶
View Source
const (
// PassboltImageEnv overrides the Passbolt image, to test another release.
PassboltImageEnv = "PASSBOLT_TEST_IMAGE"
)
Images are pinned by tag and digest. Update both together.
Variables ¶
This section is empty.
Functions ¶
func PassboltImage ¶
func PassboltImage() string
PassboltImage returns the Passbolt image Start will use.
Types ¶
type Credentials ¶
type Credentials struct {
UserID string
Email string
Password string
PrivateKey string // armored, locked with Password
}
Credentials of a Passbolt user.
type Passbolt ¶
type Passbolt struct {
BaseURL string
// contains filtered or unexported fields
}
Passbolt is a running Passbolt server.
func (*Passbolt) CreateUser ¶
func (p *Passbolt) CreateUser(ctx context.Context, email, first, last, role, password string) (Credentials, error)
CreateUser registers a user and completes their account setup.
func (*Passbolt) EnableV5Resources ¶
func (p *Passbolt) EnableV5Resources(ctx context.Context, admin Credentials) error
EnableV5Resources creates a shared metadata key and allows V5 resources, which a new server does not. Call it before other clients log in, since clients cache these settings at login. admin must have the admin role.
Click to show internal directories.
Click to hide internal directories.