testutil

package
v1.28.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	// contains filtered or unexported fields
}

func GetBasicHandler

func GetBasicHandler(t *testing.T, authService *FakeAuthService, repoName string) (http.Handler, *Dependencies)

type FakeAuthService

type FakeAuthService struct {
	BareDomain      string `json:"bare_domain"`
	AccessKeyID     string `json:"access_key_id"`
	SecretAccessKey string `json:"access_secret_key"`
	UserID          string `json:"user_id"`
	Region          string `json:"region"`
}

func (*FakeAuthService) Authorize

func (*FakeAuthService) GetCredentials

func (m *FakeAuthService) GetCredentials(_ context.Context, accessKey string) (*model.Credential, error)

func (*FakeAuthService) GetUser added in v0.69.0

func (m *FakeAuthService) GetUser(_ context.Context, _ string) (*model.User, error)

Jump to

Keyboard shortcuts

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