hook

package
v1.11.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCreatingDelegate = errors.New("failed to create delegate hook")
View Source
var ErrCreatingHook = errors.New("failed to create hook")
View Source
var ErrCreatingHookDir = errors.New("failed to create hooks directory")
View Source
var ErrNoGitRepo = errors.New("not a git repo")

Functions

func Command

func Command() *cli.Command

The hook command is nested like so:

knot hook --[flags] [hook]

func Config

func Config(opts ...setupOpt) config

func Setup

func Setup(config config) error

setup hooks for all users

directory structure is typically like so:

did:plc:foobar/repo1
did:plc:foobar/repo2
did:web:barbaz/repo1

func SetupRepo

func SetupRepo(config config, path string) error

setup hook in /scanpath/did:plc:user/repo

func SetupUser

func SetupUser(config config, userPath string) error

setup hooks in /scanpath/did:plc:user

func WithInternalApi

func WithInternalApi(api string) setupOpt

func WithScanPath

func WithScanPath(scanPath string) setupOpt

Types

type HookResponse

type HookResponse struct {
	Messages []string `json:"messages"`
}

Source Files

  • hook.go
  • setup.go

Jump to

Keyboard shortcuts

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