Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_infra_appengine_cr_rev_frontend_api_v1_service_proto protoreflect.FileDescriptor

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptorpb.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 NewRESTServer

    func NewRESTServer(r *router.Router, grpcServer CrrevServer)

      NewRESTServer installs REST handlers to provided router.

      func RegisterCrrevServer

      func RegisterCrrevServer(s prpc.Registrar, srv CrrevServer)

      Types

      type CommitRequest

      type CommitRequest struct {
      
      	// git_hash is a full git commit hash of desired commit.
      	GitHash string `protobuf:"bytes,1,opt,name=git_hash,json=gitHash,proto3" json:"git_hash,omitempty"`
      	// contains filtered or unexported fields
      }

      func (*CommitRequest) Descriptor

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

        Deprecated: Use CommitRequest.ProtoReflect.Descriptor instead.

        func (*CommitRequest) GetGitHash

        func (x *CommitRequest) GetGitHash() string

        func (*CommitRequest) ProtoMessage

        func (*CommitRequest) ProtoMessage()

        func (*CommitRequest) ProtoReflect

        func (x *CommitRequest) ProtoReflect() protoreflect.Message

        func (*CommitRequest) Reset

        func (x *CommitRequest) Reset()

        func (*CommitRequest) String

        func (x *CommitRequest) String() string

        type CommitResponse

        type CommitResponse struct {
        
        	// git_hash is a full git commit hash of matched commit that is used for
        	// redirect.
        	GitHash string `protobuf:"bytes,1,opt,name=git_hash,json=git_sha,proto3" json:"git_hash,omitempty"`
        	// host is googlesource host (e.g. chromium).
        	Host string `protobuf:"bytes,2,opt,name=host,json=project,proto3" json:"host,omitempty"`
        	// repository is Git repository (e.g. chromium/src)
        	Repository string `protobuf:"bytes,3,opt,name=repository,json=repo,proto3" json:"repository,omitempty"`
        	// position_number is sequential identifier of commit in given branch
        	// (position_ref).
        	PositionNumber int64 `protobuf:"varint,4,opt,name=position_number,json=number,proto3" json:"position_number,omitempty"`
        	// redirect_url is Gitiles URL of the commit, the same URL that user is
        	// redirected to when using crrev's main redirect logic.
        	RedirectUrl string `protobuf:"bytes,5,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty"`
        	// contains filtered or unexported fields
        }

        func (*CommitResponse) Descriptor

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

          Deprecated: Use CommitResponse.ProtoReflect.Descriptor instead.

          func (*CommitResponse) GetGitHash

          func (x *CommitResponse) GetGitHash() string

          func (*CommitResponse) GetHost

          func (x *CommitResponse) GetHost() string

          func (*CommitResponse) GetPositionNumber

          func (x *CommitResponse) GetPositionNumber() int64

          func (*CommitResponse) GetRedirectUrl

          func (x *CommitResponse) GetRedirectUrl() string

          func (*CommitResponse) GetRepository

          func (x *CommitResponse) GetRepository() string

          func (*CommitResponse) ProtoMessage

          func (*CommitResponse) ProtoMessage()

          func (*CommitResponse) ProtoReflect

          func (x *CommitResponse) ProtoReflect() protoreflect.Message

          func (*CommitResponse) Reset

          func (x *CommitResponse) Reset()

          func (*CommitResponse) String

          func (x *CommitResponse) String() string

          type CrrevClient

          type CrrevClient interface {
          	// Redirect implements the same logic as the main crrev redirect, but returns
          	// redirect and commit information in body instead of HTTP redirect.
          	Redirect(ctx context.Context, in *RedirectRequest, opts ...grpc.CallOption) (*RedirectResponse, error)
          	// Numbering returns commit that matches desired position of commit, based on
          	// NumberingRequest parameters. Commit position is based on git-footer
          	// git-svn-id or Cr-Commit-Position.
          	Numbering(ctx context.Context, in *NumberingRequest, opts ...grpc.CallOption) (*NumberingResponse, error)
          	// Commit returns commit with desired commit hash. If there are multiple
          	// commits with the same commit hash (which happens with forks and mirrors),
          	// it checks priorities based on config. It is possible that priorities are
          	// the same. In such case, there is no guarantee which one will be returned.
          	Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*CommitResponse, error)
          }

            CrrevClient is the client API for Crrev service.

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

            func NewCrrevClient

            func NewCrrevClient(cc grpc.ClientConnInterface) CrrevClient

            func NewCrrevPRPCClient

            func NewCrrevPRPCClient(client *prpc.Client) CrrevClient

            type CrrevServer

            type CrrevServer interface {
            	// Redirect implements the same logic as the main crrev redirect, but returns
            	// redirect and commit information in body instead of HTTP redirect.
            	Redirect(context.Context, *RedirectRequest) (*RedirectResponse, error)
            	// Numbering returns commit that matches desired position of commit, based on
            	// NumberingRequest parameters. Commit position is based on git-footer
            	// git-svn-id or Cr-Commit-Position.
            	Numbering(context.Context, *NumberingRequest) (*NumberingResponse, error)
            	// Commit returns commit with desired commit hash. If there are multiple
            	// commits with the same commit hash (which happens with forks and mirrors),
            	// it checks priorities based on config. It is possible that priorities are
            	// the same. In such case, there is no guarantee which one will be returned.
            	Commit(context.Context, *CommitRequest) (*CommitResponse, error)
            }

              CrrevServer is the server API for Crrev service.

              func NewServer

              func NewServer(rules *redirect.Rules) CrrevServer

                NewServer returns new instance of CrrevServer. It uses datastore to retrieve commit information. Passed rules should match cr-rev main redirect rules.

                type NumberingRequest

                type NumberingRequest struct {
                
                	// host is googlesource host (e.g. chromium).
                	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
                	// repository is Git repository (e.g. chromium/src)
                	Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
                	// position_ref is name of position defined in value of git-footer git-svn-id
                	// or Cr-Commit-Position (e.g. refs/heads/master,
                	// svn://svn.chromium.org/chrome/trunk/src)
                	PositionRef string `protobuf:"bytes,3,opt,name=position_ref,json=positionRef,proto3" json:"position_ref,omitempty"`
                	// position_number is sequential identifier of commit in given branch
                	// (position_ref).
                	PositionNumber int64 `protobuf:"varint,4,opt,name=position_number,json=positionNumber,proto3" json:"position_number,omitempty"`
                	// contains filtered or unexported fields
                }

                func (*NumberingRequest) Descriptor

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

                  Deprecated: Use NumberingRequest.ProtoReflect.Descriptor instead.

                  func (*NumberingRequest) GetHost

                  func (x *NumberingRequest) GetHost() string

                  func (*NumberingRequest) GetPositionNumber

                  func (x *NumberingRequest) GetPositionNumber() int64

                  func (*NumberingRequest) GetPositionRef

                  func (x *NumberingRequest) GetPositionRef() string

                  func (*NumberingRequest) GetRepository

                  func (x *NumberingRequest) GetRepository() string

                  func (*NumberingRequest) ProtoMessage

                  func (*NumberingRequest) ProtoMessage()

                  func (*NumberingRequest) ProtoReflect

                  func (x *NumberingRequest) ProtoReflect() protoreflect.Message

                  func (*NumberingRequest) Reset

                  func (x *NumberingRequest) Reset()

                  func (*NumberingRequest) String

                  func (x *NumberingRequest) String() string

                  type NumberingResponse

                  type NumberingResponse struct {
                  
                  	// git_hash is a full git commit hash of matched commit that is used for
                  	// redirect.
                  	GitHash string `protobuf:"bytes,1,opt,name=git_hash,json=git_sha,proto3" json:"git_hash,omitempty"`
                  	// position_number matches NumberingRequest position_number. Probably useless
                  	// to clients, but kept for backward compatibility.
                  	PositionNumber int64 `protobuf:"varint,2,opt,name=position_number,json=number,proto3" json:"position_number,omitempty"`
                  	// host matches NumberingRequest host. Probably useless to clients, but kept
                  	// for backward compatibility.
                  	Host string `protobuf:"bytes,3,opt,name=host,json=project,proto3" json:"host,omitempty"`
                  	// repository matches NumberingRequest repository. Probably useless to
                  	// clients, but kept for backward compatibility.
                  	Repository string `protobuf:"bytes,4,opt,name=repository,json=repo,proto3" json:"repository,omitempty"`
                  	// contains filtered or unexported fields
                  }

                  func (*NumberingResponse) Descriptor

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

                    Deprecated: Use NumberingResponse.ProtoReflect.Descriptor instead.

                    func (*NumberingResponse) GetGitHash

                    func (x *NumberingResponse) GetGitHash() string

                    func (*NumberingResponse) GetHost

                    func (x *NumberingResponse) GetHost() string

                    func (*NumberingResponse) GetPositionNumber

                    func (x *NumberingResponse) GetPositionNumber() int64

                    func (*NumberingResponse) GetRepository

                    func (x *NumberingResponse) GetRepository() string

                    func (*NumberingResponse) ProtoMessage

                    func (*NumberingResponse) ProtoMessage()

                    func (*NumberingResponse) ProtoReflect

                    func (x *NumberingResponse) ProtoReflect() protoreflect.Message

                    func (*NumberingResponse) Reset

                    func (x *NumberingResponse) Reset()

                    func (*NumberingResponse) String

                    func (x *NumberingResponse) String() string

                    type RedirectRequest

                    type RedirectRequest struct {
                    
                    	// query is equal to URL path of crrev main redirect logic. For example, it
                    	// can be "/3" (redirect to chromium/src commit with position 3) or
                    	// /{some_commit_hash} (redirect to some repository based on
                    	// some_commit_hash), etc.
                    	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
                    	// contains filtered or unexported fields
                    }

                    func (*RedirectRequest) Descriptor

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

                      Deprecated: Use RedirectRequest.ProtoReflect.Descriptor instead.

                      func (*RedirectRequest) GetQuery

                      func (x *RedirectRequest) GetQuery() string

                      func (*RedirectRequest) ProtoMessage

                      func (*RedirectRequest) ProtoMessage()

                      func (*RedirectRequest) ProtoReflect

                      func (x *RedirectRequest) ProtoReflect() protoreflect.Message

                      func (*RedirectRequest) Reset

                      func (x *RedirectRequest) Reset()

                      func (*RedirectRequest) String

                      func (x *RedirectRequest) String() string

                      type RedirectResponse

                      type RedirectResponse struct {
                      
                      	// git_hash is a full git commit hash of matched commit that is used for
                      	// redirect.
                      	GitHash string `protobuf:"bytes,1,opt,name=git_hash,json=git_sha,proto3" json:"git_hash,omitempty"`
                      	// host is googlesource host (e.g. chromium).
                      	Host string `protobuf:"bytes,2,opt,name=host,json=project,proto3" json:"host,omitempty"`
                      	// repository is Git repository (e.g. chromium/src)
                      	Repository string `protobuf:"bytes,3,opt,name=repository,json=repo,proto3" json:"repository,omitempty"`
                      	// redirect_url is Gitiles URL of the commit, the same URL that user is
                      	// redirected to when using crrev's main redirect logic.
                      	RedirectUrl string `protobuf:"bytes,4,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty"`
                      	// contains filtered or unexported fields
                      }

                      func (*RedirectResponse) Descriptor

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

                        Deprecated: Use RedirectResponse.ProtoReflect.Descriptor instead.

                        func (*RedirectResponse) GetGitHash

                        func (x *RedirectResponse) GetGitHash() string

                        func (*RedirectResponse) GetHost

                        func (x *RedirectResponse) GetHost() string

                        func (*RedirectResponse) GetRedirectUrl

                        func (x *RedirectResponse) GetRedirectUrl() string

                        func (*RedirectResponse) GetRepository

                        func (x *RedirectResponse) GetRepository() string

                        func (*RedirectResponse) ProtoMessage

                        func (*RedirectResponse) ProtoMessage()

                        func (*RedirectResponse) ProtoReflect

                        func (x *RedirectResponse) ProtoReflect() protoreflect.Message

                        func (*RedirectResponse) Reset

                        func (x *RedirectResponse) Reset()

                        func (*RedirectResponse) String

                        func (x *RedirectResponse) String() string

                        type UnimplementedCrrevServer

                        type UnimplementedCrrevServer struct {
                        }

                          UnimplementedCrrevServer can be embedded to have forward compatible implementations.

                          func (*UnimplementedCrrevServer) Commit

                          func (*UnimplementedCrrevServer) Numbering

                          func (*UnimplementedCrrevServer) Redirect