luci: go.chromium.org/luci/common/proto/gitiles Index | Files

package gitiles

import "go.chromium.org/luci/common/proto/gitiles"

Package gitiles contains Gitiles service definition.

Package gitiles is a generated GoMock package.

Index

Package Files

const.go generate.go gitiles.mock.pb.go gitiles.pb.go pb.discovery.go validation.go

Constants

const (
    // AllRefs instructs the client to fetch all refs.
    AllRefs = "refs"
    // Branches instructs the client to fetch all branches.
    Branches = "refs/heads"
    // Tags instructs the client to fetch all tags.
    Tags = "refs/tags"
)

These constants are possible values for RefsRequest.RefsPath field. Not an exhaustive list.

Variables

var ArchiveRequest_Format_name = map[int32]string{
    0:  "Invalid",
    1:  "GZIP",
    2:  "TAR",
    3:  "BZIP2",
    4:  "XZ",
}
var ArchiveRequest_Format_value = map[string]int32{
    "Invalid": 0,
    "GZIP":    1,
    "TAR":     2,
    "BZIP2":   3,
    "XZ":      4,
}

func FileDescriptorSet Uses

func FileDescriptorSet() *descriptor.FileDescriptorSet

FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterGitilesServer Uses

func RegisterGitilesServer(s prpc.Registrar, srv GitilesServer)

type ArchiveRequest Uses

type ArchiveRequest struct {
    // Gitiles project, e.g. "chromium/src" part in
    // https://chromium.googlesource.com/chromium/src/+/master
    // Required.
    Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
    // The ref at which to generate the project archive for.
    //
    // viz refs/for/branch or just branch
    Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`
    // Format of the returned project archive.
    Format               ArchiveRequest_Format `protobuf:"varint,3,opt,name=format,proto3,enum=gitiles.ArchiveRequest_Format" json:"format,omitempty"`
    XXX_NoUnkeyedLiteral struct{}              `json:"-"`
    XXX_unrecognized     []byte                `json:"-"`
    XXX_sizecache        int32                 `json:"-"`
}

ArchiveRequest is a request message of the Gitiles.Archive RPC.

func (*ArchiveRequest) Descriptor Uses

func (*ArchiveRequest) Descriptor() ([]byte, []int)

func (*ArchiveRequest) GetFormat Uses

func (m *ArchiveRequest) GetFormat() ArchiveRequest_Format

func (*ArchiveRequest) GetProject Uses

func (m *ArchiveRequest) GetProject() string

func (*ArchiveRequest) GetRef Uses

func (m *ArchiveRequest) GetRef() string

func (*ArchiveRequest) ProtoMessage Uses

func (*ArchiveRequest) ProtoMessage()

func (*ArchiveRequest) Reset Uses

func (m *ArchiveRequest) Reset()

func (*ArchiveRequest) String Uses

func (m *ArchiveRequest) String() string

func (*ArchiveRequest) Validate Uses

func (r *ArchiveRequest) Validate() error

Validate returns an error if r is invalid.

func (*ArchiveRequest) XXX_DiscardUnknown Uses

func (m *ArchiveRequest) XXX_DiscardUnknown()

func (*ArchiveRequest) XXX_Marshal Uses

func (m *ArchiveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ArchiveRequest) XXX_Merge Uses

func (m *ArchiveRequest) XXX_Merge(src proto.Message)

func (*ArchiveRequest) XXX_Size Uses

func (m *ArchiveRequest) XXX_Size() int

func (*ArchiveRequest) XXX_Unmarshal Uses

func (m *ArchiveRequest) XXX_Unmarshal(b []byte) error

type ArchiveRequest_Format Uses

type ArchiveRequest_Format int32

List copied from https://github.com/google/gitiles/blob/65edbe49f2b3882a5979f602383ef0c7b2b8ee0c/java/com/google/gitiles/ArchiveFormat.java

const (
    ArchiveRequest_Invalid ArchiveRequest_Format = 0
    ArchiveRequest_GZIP    ArchiveRequest_Format = 1
    ArchiveRequest_TAR     ArchiveRequest_Format = 2
    ArchiveRequest_BZIP2   ArchiveRequest_Format = 3
    ArchiveRequest_XZ      ArchiveRequest_Format = 4
)

func (ArchiveRequest_Format) EnumDescriptor Uses

func (ArchiveRequest_Format) EnumDescriptor() ([]byte, []int)

func (ArchiveRequest_Format) String Uses

func (x ArchiveRequest_Format) String() string

type ArchiveResponse Uses

type ArchiveResponse struct {
    // Suggested name of the returned archive.
    Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
    // Contents of the archive streamed from gitiles.
    //
    // The underlying server RPC streams back the contents. This API simplifies
    // the RPC to a non-streaming response.
    Contents             []byte   `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*ArchiveResponse) Descriptor Uses

func (*ArchiveResponse) Descriptor() ([]byte, []int)

func (*ArchiveResponse) GetContents Uses

func (m *ArchiveResponse) GetContents() []byte

func (*ArchiveResponse) GetFilename Uses

func (m *ArchiveResponse) GetFilename() string

func (*ArchiveResponse) ProtoMessage Uses

func (*ArchiveResponse) ProtoMessage()

func (*ArchiveResponse) Reset Uses

func (m *ArchiveResponse) Reset()

func (*ArchiveResponse) String Uses

func (m *ArchiveResponse) String() string

func (*ArchiveResponse) XXX_DiscardUnknown Uses

func (m *ArchiveResponse) XXX_DiscardUnknown()

func (*ArchiveResponse) XXX_Marshal Uses

func (m *ArchiveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ArchiveResponse) XXX_Merge Uses

func (m *ArchiveResponse) XXX_Merge(src proto.Message)

func (*ArchiveResponse) XXX_Size Uses

func (m *ArchiveResponse) XXX_Size() int

func (*ArchiveResponse) XXX_Unmarshal Uses

func (m *ArchiveResponse) XXX_Unmarshal(b []byte) error

type GitilesClient Uses

type GitilesClient interface {
    // Log retrieves commit log.
    Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*LogResponse, error)
    // Refs retrieves repo refs.
    Refs(ctx context.Context, in *RefsRequest, opts ...grpc.CallOption) (*RefsResponse, error)
    // Archive retrieves archived contents of the project.
    //
    // An archive is a shallow bundle of the contents of a repository.
    Archive(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)
}

GitilesClient is the client API for Gitiles service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGitilesClient Uses

func NewGitilesClient(cc *grpc.ClientConn) GitilesClient

func NewGitilesPRPCClient Uses

func NewGitilesPRPCClient(client *prpc.Client) GitilesClient

type GitilesServer Uses

type GitilesServer interface {
    // Log retrieves commit log.
    Log(context.Context, *LogRequest) (*LogResponse, error)
    // Refs retrieves repo refs.
    Refs(context.Context, *RefsRequest) (*RefsResponse, error)
    // Archive retrieves archived contents of the project.
    //
    // An archive is a shallow bundle of the contents of a repository.
    Archive(context.Context, *ArchiveRequest) (*ArchiveResponse, error)
}

GitilesServer is the server API for Gitiles service.

type LogRequest Uses

type LogRequest struct {
    // Gitiles project, e.g. "chromium/src" part in
    // https://chromium.googlesource.com/chromium/src/+/master
    // Required.
    Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
    // The commit where to start the listing from.
    // The value can be:
    //   - a git revision as 40-char string or its prefix so long as its unique in repo.
    //   - a ref such as "refs/heads/branch" or just "branch"
    //   - a ref defined as n-th parent of R in the form "R~n".
    //     For example, "master~2" or "deadbeef~1".
    // Required.
    Committish string `protobuf:"bytes,3,opt,name=committish,proto3" json:"committish,omitempty"`
    // If specified, only commits not reachable from this commit (inclusive)
    // will be returned.
    //
    // In git's notation, this is
    //   $ git log ^exclude_ancestors_of committish
    //  OR
    //   $ git log exclude_ancestors_of..committish
    // https://git-scm.com/docs/gitrevisions#gitrevisions-Theememtwo-dotRangeNotation
    //
    // For example, given this repo
    //
    //     base -> A -> B -> C == refs/heads/master
    //        \
    //         X -> Y -> Z  == refs/heads/release
    //
    // calling Log(committish='refs/heads/release',
    //             exclude_ancestors_of='refs/heads/master')
    // will return ['Z', Y', 'X'].
    ExcludeAncestorsOf string `protobuf:"bytes,2,opt,name=exclude_ancestors_of,json=excludeAncestorsOf,proto3" json:"exclude_ancestors_of,omitempty"`
    // If true, include tree diff in commits.
    TreeDiff bool `protobuf:"varint,4,opt,name=tree_diff,json=treeDiff,proto3" json:"tree_diff,omitempty"`
    // Value of next_page_token in LogResponse to continue.
    PageToken string `protobuf:"bytes,10,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
    // If > 0, number of commits to retrieve.
    PageSize             int32    `protobuf:"varint,11,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

LogRequest is request message for Gitiles.Log rpc.

func (*LogRequest) Descriptor Uses

func (*LogRequest) Descriptor() ([]byte, []int)

func (*LogRequest) GetCommittish Uses

func (m *LogRequest) GetCommittish() string

func (*LogRequest) GetExcludeAncestorsOf Uses

func (m *LogRequest) GetExcludeAncestorsOf() string

func (*LogRequest) GetPageSize Uses

func (m *LogRequest) GetPageSize() int32

func (*LogRequest) GetPageToken Uses

func (m *LogRequest) GetPageToken() string

func (*LogRequest) GetProject Uses

func (m *LogRequest) GetProject() string

func (*LogRequest) GetTreeDiff Uses

func (m *LogRequest) GetTreeDiff() bool

func (*LogRequest) ProtoMessage Uses

func (*LogRequest) ProtoMessage()

func (*LogRequest) Reset Uses

func (m *LogRequest) Reset()

func (*LogRequest) String Uses

func (m *LogRequest) String() string

func (*LogRequest) Validate Uses

func (r *LogRequest) Validate() error

Validate returns an error if r is invalid.

func (*LogRequest) XXX_DiscardUnknown Uses

func (m *LogRequest) XXX_DiscardUnknown()

func (*LogRequest) XXX_Marshal Uses

func (m *LogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogRequest) XXX_Merge Uses

func (m *LogRequest) XXX_Merge(src proto.Message)

func (*LogRequest) XXX_Size Uses

func (m *LogRequest) XXX_Size() int

func (*LogRequest) XXX_Unmarshal Uses

func (m *LogRequest) XXX_Unmarshal(b []byte) error

type LogResponse Uses

type LogResponse struct {
    // Retrieved commits.
    Log []*git.Commit `protobuf:"bytes,1,rep,name=log,proto3" json:"log,omitempty"`
    // A page token for next LogRequest to fetch next page of commits.
    NextPageToken        string   `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

LogRequest is response message for Gitiles.Log rpc.

func (*LogResponse) Descriptor Uses

func (*LogResponse) Descriptor() ([]byte, []int)

func (*LogResponse) GetLog Uses

func (m *LogResponse) GetLog() []*git.Commit

func (*LogResponse) GetNextPageToken Uses

func (m *LogResponse) GetNextPageToken() string

func (*LogResponse) ProtoMessage Uses

func (*LogResponse) ProtoMessage()

func (*LogResponse) Reset Uses

func (m *LogResponse) Reset()

func (*LogResponse) String Uses

func (m *LogResponse) String() string

func (*LogResponse) XXX_DiscardUnknown Uses

func (m *LogResponse) XXX_DiscardUnknown()

func (*LogResponse) XXX_Marshal Uses

func (m *LogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogResponse) XXX_Merge Uses

func (m *LogResponse) XXX_Merge(src proto.Message)

func (*LogResponse) XXX_Size Uses

func (m *LogResponse) XXX_Size() int

func (*LogResponse) XXX_Unmarshal Uses

func (m *LogResponse) XXX_Unmarshal(b []byte) error

type MockGitilesClient Uses

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

MockGitilesClient is a mock of GitilesClient interface

func NewMockGitilesClient Uses

func NewMockGitilesClient(ctrl *gomock.Controller) *MockGitilesClient

NewMockGitilesClient creates a new mock instance

func (*MockGitilesClient) Archive Uses

func (m *MockGitilesClient) Archive(ctx context.Context, in *ArchiveRequest, opts ...grpc.CallOption) (*ArchiveResponse, error)

Archive mocks base method

func (*MockGitilesClient) EXPECT Uses

func (m *MockGitilesClient) EXPECT() *MockGitilesClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockGitilesClient) Log Uses

func (m *MockGitilesClient) Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*LogResponse, error)

Log mocks base method

func (*MockGitilesClient) Refs Uses

func (m *MockGitilesClient) Refs(ctx context.Context, in *RefsRequest, opts ...grpc.CallOption) (*RefsResponse, error)

Refs mocks base method

type MockGitilesClientMockRecorder Uses

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

MockGitilesClientMockRecorder is the mock recorder for MockGitilesClient

func (*MockGitilesClientMockRecorder) Archive Uses

func (mr *MockGitilesClientMockRecorder) Archive(ctx, in interface{}, opts ...interface{}) *gomock.Call

Archive indicates an expected call of Archive

func (*MockGitilesClientMockRecorder) Log Uses

func (mr *MockGitilesClientMockRecorder) Log(ctx, in interface{}, opts ...interface{}) *gomock.Call

Log indicates an expected call of Log

func (*MockGitilesClientMockRecorder) Refs Uses

func (mr *MockGitilesClientMockRecorder) Refs(ctx, in interface{}, opts ...interface{}) *gomock.Call

Refs indicates an expected call of Refs

type MockGitilesServer Uses

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

MockGitilesServer is a mock of GitilesServer interface

func NewMockGitilesServer Uses

func NewMockGitilesServer(ctrl *gomock.Controller) *MockGitilesServer

NewMockGitilesServer creates a new mock instance

func (*MockGitilesServer) Archive Uses

func (m *MockGitilesServer) Archive(arg0 context.Context, arg1 *ArchiveRequest) (*ArchiveResponse, error)

Archive mocks base method

func (*MockGitilesServer) EXPECT Uses

func (m *MockGitilesServer) EXPECT() *MockGitilesServerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockGitilesServer) Log Uses

func (m *MockGitilesServer) Log(arg0 context.Context, arg1 *LogRequest) (*LogResponse, error)

Log mocks base method

func (*MockGitilesServer) Refs Uses

func (m *MockGitilesServer) Refs(arg0 context.Context, arg1 *RefsRequest) (*RefsResponse, error)

Refs mocks base method

type MockGitilesServerMockRecorder Uses

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

MockGitilesServerMockRecorder is the mock recorder for MockGitilesServer

func (*MockGitilesServerMockRecorder) Archive Uses

func (mr *MockGitilesServerMockRecorder) Archive(arg0, arg1 interface{}) *gomock.Call

Archive indicates an expected call of Archive

func (*MockGitilesServerMockRecorder) Log Uses

func (mr *MockGitilesServerMockRecorder) Log(arg0, arg1 interface{}) *gomock.Call

Log indicates an expected call of Log

func (*MockGitilesServerMockRecorder) Refs Uses

func (mr *MockGitilesServerMockRecorder) Refs(arg0, arg1 interface{}) *gomock.Call

Refs indicates an expected call of Refs

type RefsRequest Uses

type RefsRequest struct {
    // Gitiles project, e.g. "chromium/src" part in
    // https://chromium.googlesource.com/chromium/src/+/master
    // Required.
    Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
    // Limits which refs to resolve to only those matching {refsPath}/*.
    //
    // Must be "refs" or start with "refs/".
    // Must not include glob '*'.
    // Use "refs/heads" to retrieve all branches.
    //
    // To fetch **all** refs in a repo, specify just "refs" but beware of two
    // caveats:
    //  * refs returned include a ref for each patchset for each Gerrit change
    //    associated with the repo.
    //  * returned map will contain special "HEAD" ref whose value in resulting map
    //    will be name of the actual ref to which "HEAD" points, which is typically
    //    "refs/heads/master".
    //
    // Thus, if you are looking for all tags and all branches of repo, it's
    // recommended to issue two Refs calls limited to "refs/tags" and "refs/heads"
    // instead of one call for "refs".
    //
    // Since Gerrit allows per-ref ACLs, it is possible that some refs matching
    // refPrefix would not be present in results because current user isn't granted
    // read permission on them.
    RefsPath             string   `protobuf:"bytes,2,opt,name=refs_path,json=refsPath,proto3" json:"refs_path,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

RefsRequest is a request message of Gitiles.Refs RPC.

func (*RefsRequest) Descriptor Uses

func (*RefsRequest) Descriptor() ([]byte, []int)

func (*RefsRequest) GetProject Uses

func (m *RefsRequest) GetProject() string

func (*RefsRequest) GetRefsPath Uses

func (m *RefsRequest) GetRefsPath() string

func (*RefsRequest) ProtoMessage Uses

func (*RefsRequest) ProtoMessage()

func (*RefsRequest) Reset Uses

func (m *RefsRequest) Reset()

func (*RefsRequest) String Uses

func (m *RefsRequest) String() string

func (*RefsRequest) Validate Uses

func (r *RefsRequest) Validate() error

Validate returns an error if r is invalid.

func (*RefsRequest) XXX_DiscardUnknown Uses

func (m *RefsRequest) XXX_DiscardUnknown()

func (*RefsRequest) XXX_Marshal Uses

func (m *RefsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RefsRequest) XXX_Merge Uses

func (m *RefsRequest) XXX_Merge(src proto.Message)

func (*RefsRequest) XXX_Size Uses

func (m *RefsRequest) XXX_Size() int

func (*RefsRequest) XXX_Unmarshal Uses

func (m *RefsRequest) XXX_Unmarshal(b []byte) error

type RefsResponse Uses

type RefsResponse struct {
    // revisions maps a ref to a revision.
    // Git branches have keys start with "refs/heads/".
    Revisions            map[string]string `protobuf:"bytes,2,rep,name=revisions,proto3" json:"revisions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

RefsResponse is a response message of Gitiles.Refs RPC.

func (*RefsResponse) Descriptor Uses

func (*RefsResponse) Descriptor() ([]byte, []int)

func (*RefsResponse) GetRevisions Uses

func (m *RefsResponse) GetRevisions() map[string]string

func (*RefsResponse) ProtoMessage Uses

func (*RefsResponse) ProtoMessage()

func (*RefsResponse) Reset Uses

func (m *RefsResponse) Reset()

func (*RefsResponse) String Uses

func (m *RefsResponse) String() string

func (*RefsResponse) XXX_DiscardUnknown Uses

func (m *RefsResponse) XXX_DiscardUnknown()

func (*RefsResponse) XXX_Marshal Uses

func (m *RefsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RefsResponse) XXX_Merge Uses

func (m *RefsResponse) XXX_Merge(src proto.Message)

func (*RefsResponse) XXX_Size Uses

func (m *RefsResponse) XXX_Size() int

func (*RefsResponse) XXX_Unmarshal Uses

func (m *RefsResponse) XXX_Unmarshal(b []byte) error

Package gitiles imports 13 packages (graph) and is imported by 10 packages. Updated 2018-12-17. Refresh now. Tools for package owners.