Documentation
¶
Index ¶
- type BranchClient
- type CheckoutOption
- type CheckoutOptions
- type Client
- type CreateOption
- type CreateOptions
- type DeleteOption
- type DeleteOptions
- type DiffOption
- type DiffOptions
- type GetOption
- type GetOptions
- type ListOption
- type ListOptions
- type MergeOption
- type MergeOptions
- type StashOption
- type StashOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchClient ¶ added in v0.0.9
type BranchClient interface {
Get(ctx context.Context, in *branchpb.Get_Request, opts ...grpc.CallOption) (*branchpb.Get_Response, error)
List(ctx context.Context, in *branchpb.List_Request, opts ...grpc.CallOption) (*branchpb.List_Response, error)
Create(ctx context.Context, in *branchpb.Create_Request, opts ...grpc.CallOption) (*branchpb.Create_Response, error)
Delete(ctx context.Context, in *branchpb.Delete_Request, opts ...grpc.CallOption) (*branchpb.Delete_Response, error)
Merge(ctx context.Context, in *branchpb.Merge_Request, opts ...grpc.CallOption) (*branchpb.Merge_Response, error)
Diff(ctx context.Context, in *branchpb.Diff_Request, opts ...grpc.CallOption) (*branchpb.Diff_Response, error)
Stash(ctx context.Context, in *branchpb.Stash_Request, opts ...grpc.CallOption) (*branchpb.Stash_Response, error)
Checkout(ctx context.Context, in *branchpb.Checkout_Request, opts ...grpc.CallOption) (*branchpb.Checkout_Response, error)
StreamFiles(ctx context.Context, in *branchpb.Get_Request, opts ...grpc.CallOption) chan *branchpb.Get_File
Watch(ctx context.Context, in *branchpb.Watch_Request, opts ...grpc.CallOption) chan *branchpb.Watch_Response
Close() error
}
func NewBranchClient ¶ added in v0.0.9
func NewBranchClient(config *config.Config) (BranchClient, error)
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
}
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)