branchclient

package
v0.0.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckoutOption added in v0.0.9

type CheckoutOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToCheckout(*CheckoutOptions)
}

type CheckoutOptions

type CheckoutOptions struct {
	Proxy types.NamespacedName
}

func (*CheckoutOptions) ApplyOptions added in v0.0.9

func (o *CheckoutOptions) ApplyOptions(opts []CheckoutOption) *CheckoutOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*CheckoutOptions) ApplyToCheckout added in v0.0.9

func (o *CheckoutOptions) ApplyToCheckout(lo *CheckoutOptions)

type Client

type Client interface {
	Get(ctx context.Context, branch string, opt ...GetOption) ([]*branchpb.Get_Log, error)
	List(ctx context.Context, opt ...ListOption) ([]*branchpb.BranchObject, error)
	Create(ctx context.Context, branch string, opt ...CreateOption) error
	Delete(ctx context.Context, branch string, opt ...DeleteOption) error
	Diff(ctx context.Context, srcbranch, dstbranch string, opt ...DiffOption) ([]*branchpb.Diff_Diff, error)
	Merge(ctx context.Context, srcbranch, dstbranch string, opt ...MergeOption) error
	Stash(ctx context.Context, branch string, opt ...StashOption) error
	Checkout(ctx context.Context, branch string, opt ...CheckoutOption) error
	StreamFiles(ctx context.Context, branch string, opts ...ListOption) chan *branchpb.Get_File
	Watch(ctx context.Context, in *branchpb.Watch_Request, opts ...ListOption) chan *branchpb.Watch_Response
	Close() error
}

func NewClient

func NewClient(config *config.Config) (Client, error)

type CreateOption added in v0.0.9

type CreateOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToCreate(*CreateOptions)
}

type CreateOptions

type CreateOptions struct {
	Proxy types.NamespacedName
}

func (*CreateOptions) ApplyOptions added in v0.0.9

func (o *CreateOptions) ApplyOptions(opts []CreateOption) *CreateOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*CreateOptions) ApplyToCreate added in v0.0.9

func (o *CreateOptions) ApplyToCreate(lo *CreateOptions)

type DeleteOption added in v0.0.9

type DeleteOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToDelete(*DeleteOptions)
}

type DeleteOptions

type DeleteOptions struct {
	Proxy types.NamespacedName
}

func (*DeleteOptions) ApplyOptions added in v0.0.9

func (o *DeleteOptions) ApplyOptions(opts []DeleteOption) *DeleteOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*DeleteOptions) ApplyToDelete added in v0.0.9

func (o *DeleteOptions) ApplyToDelete(lo *DeleteOptions)

type DiffOption added in v0.0.9

type DiffOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToDiff(*DiffOptions)
}

type DiffOptions

type DiffOptions struct {
	Proxy types.NamespacedName
}

func (*DiffOptions) ApplyOptions added in v0.0.9

func (o *DiffOptions) ApplyOptions(opts []DiffOption) *DiffOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*DiffOptions) ApplyToDiff added in v0.0.9

func (o *DiffOptions) ApplyToDiff(lo *DiffOptions)

type GetOption added in v0.0.9

type GetOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToGet(*GetOptions)
}

type GetOptions

type GetOptions struct {
	Proxy types.NamespacedName
}

func (*GetOptions) ApplyOptions added in v0.0.9

func (o *GetOptions) ApplyOptions(opts []GetOption) *GetOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*GetOptions) ApplyToGet added in v0.0.9

func (o *GetOptions) ApplyToGet(lo *GetOptions)

type ListOption added in v0.0.9

type ListOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToList(*ListOptions)
}

type ListOptions

type ListOptions struct {
	Proxy types.NamespacedName
}

func (*ListOptions) ApplyOptions added in v0.0.9

func (o *ListOptions) ApplyOptions(opts []ListOption) *ListOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*ListOptions) ApplyToList added in v0.0.9

func (o *ListOptions) ApplyToList(lo *ListOptions)

type MergeOption added in v0.0.9

type MergeOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToMerge(*MergeOptions)
}

type MergeOptions

type MergeOptions struct {
	Proxy types.NamespacedName
}

func (*MergeOptions) ApplyOptions added in v0.0.9

func (o *MergeOptions) ApplyOptions(opts []MergeOption) *MergeOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*MergeOptions) ApplyToMerge added in v0.0.9

func (o *MergeOptions) ApplyToMerge(lo *MergeOptions)

type StashOption added in v0.0.9

type StashOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToStash(*StashOptions)
}

type StashOptions

type StashOptions struct {
	Proxy types.NamespacedName
}

func (*StashOptions) ApplyOptions added in v0.0.9

func (o *StashOptions) ApplyOptions(opts []StashOption) *StashOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*StashOptions) ApplyToStash added in v0.0.9

func (o *StashOptions) ApplyToStash(lo *StashOptions)

Jump to

Keyboard shortcuts

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