addon

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HandshakeConfig = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "WOODPECKER_FORGE_ADDON_PLUGIN",
	MagicCookieValue: "woodpecker-plugin-magic-cookie-value",
}

Functions

func Load

func Load(file string) (forge.Forge, error)

func Serve

func Serve(impl forge.Forge)

Types

type Plugin

type Plugin struct {
	Impl forge.Forge
}

func (*Plugin) Client

func (*Plugin) Client(_ *plugin.MuxBroker, c *rpc.Client) (any, error)

func (*Plugin) Server

func (p *Plugin) Server(*plugin.MuxBroker) (any, error)

type RPC

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

func (*RPC) Activate

func (g *RPC) Activate(_ context.Context, u *model.User, r *model.Repo, link string) error

func (*RPC) Auth

func (g *RPC) Auth(_ context.Context, token, secret string) (string, error)

func (*RPC) BranchHead

func (g *RPC) BranchHead(_ context.Context, u *model.User, r *model.Repo, branch string) (*model.Commit, error)

func (*RPC) Branches

func (g *RPC) Branches(_ context.Context, u *model.User, r *model.Repo, p *model.ListOptions) ([]string, error)

func (*RPC) Deactivate

func (g *RPC) Deactivate(_ context.Context, u *model.User, r *model.Repo, link string) error

func (*RPC) Dir

func (g *RPC) Dir(_ context.Context, u *model.User, r *model.Repo, b *model.Pipeline, f string) ([]*types.FileMeta, error)

func (*RPC) File

func (g *RPC) File(_ context.Context, u *model.User, r *model.Repo, b *model.Pipeline, f string) ([]byte, error)

func (*RPC) Hook

func (g *RPC) Hook(_ context.Context, r *http.Request) (*model.Repo, *model.Pipeline, error)

func (*RPC) Login

func (g *RPC) Login(_ context.Context, r *types.OAuthRequest) (*model.User, string, error)

func (*RPC) Name

func (g *RPC) Name() string

func (*RPC) Netrc

func (g *RPC) Netrc(u *model.User, r *model.Repo) (*model.Netrc, error)

func (*RPC) Org

func (g *RPC) Org(_ context.Context, u *model.User, org string) (*model.Org, error)

func (*RPC) OrgMembership

func (g *RPC) OrgMembership(_ context.Context, u *model.User, org string) (*model.OrgPerm, error)

func (*RPC) PullRequests

func (g *RPC) PullRequests(_ context.Context, u *model.User, r *model.Repo, p *model.ListOptions) ([]*model.PullRequest, error)

func (*RPC) Repo

func (g *RPC) Repo(_ context.Context, u *model.User, remoteID model.ForgeRemoteID, owner, name string) (*model.Repo, error)

func (*RPC) Repos

func (g *RPC) Repos(_ context.Context, u *model.User) ([]*model.Repo, error)

func (*RPC) Status

func (g *RPC) Status(_ context.Context, u *model.User, r *model.Repo, b *model.Pipeline, p *model.Workflow) error

func (*RPC) Teams

func (g *RPC) Teams(_ context.Context, u *model.User) ([]*model.Team, error)

func (*RPC) URL

func (g *RPC) URL() string

type RPCServer

type RPCServer struct {
	Impl forge.Forge
}

func (*RPCServer) Activate

func (s *RPCServer) Activate(args []byte, resp *[]byte) error

func (*RPCServer) BranchHead

func (s *RPCServer) BranchHead(args []byte, resp *[]byte) error

func (*RPCServer) Branches

func (s *RPCServer) Branches(args []byte, resp *[]byte) error

func (*RPCServer) Deactivate

func (s *RPCServer) Deactivate(args []byte, resp *[]byte) error

func (*RPCServer) Dir

func (s *RPCServer) Dir(args []byte, resp *[]byte) error

func (*RPCServer) File

func (s *RPCServer) File(args []byte, resp *[]byte) error

func (*RPCServer) Hook

func (s *RPCServer) Hook(args []byte, resp *[]byte) error

func (*RPCServer) Login

func (s *RPCServer) Login(args []byte, resp *[]byte) error

func (*RPCServer) Name

func (s *RPCServer) Name(_ []byte, resp *string) error

func (*RPCServer) Netrc

func (s *RPCServer) Netrc(args []byte, resp *[]byte) error

func (*RPCServer) Org

func (s *RPCServer) Org(args []byte, resp *[]byte) error

func (*RPCServer) OrgMembership

func (s *RPCServer) OrgMembership(args []byte, resp *[]byte) error

func (*RPCServer) PullRequests

func (s *RPCServer) PullRequests(args []byte, resp *[]byte) error

func (*RPCServer) Repo

func (s *RPCServer) Repo(args []byte, resp *[]byte) error

func (*RPCServer) Repos

func (s *RPCServer) Repos(args []byte, resp *[]byte) error

func (*RPCServer) Status

func (s *RPCServer) Status(args []byte, resp *[]byte) error

func (*RPCServer) Teams

func (s *RPCServer) Teams(args []byte, resp *[]byte) error

func (*RPCServer) URL

func (s *RPCServer) URL(_ []byte, resp *string) error

Jump to

Keyboard shortcuts

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