apipb

package
v0.0.0-...-b224b64 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package apipb is a generated protocol buffer package.

It is generated from these files:

api/pb/api.proto

It has these top-level messages:

APIAuthenticateRequest
APIAuthenticateReply
APIValidateRequest
APIValidateReply
APISubmitRequest
APISubmitReply
APIGetRequest
APIGetReply

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAPIServer

func RegisterAPIServer(s *grpc.Server, srv APIServer)

Types

type APIAuthenticateReply

type APIAuthenticateReply struct {
	Session string `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
}

func (*APIAuthenticateReply) Descriptor

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

func (*APIAuthenticateReply) GetSession

func (m *APIAuthenticateReply) GetSession() string

func (*APIAuthenticateReply) ProtoMessage

func (*APIAuthenticateReply) ProtoMessage()

func (*APIAuthenticateReply) Reset

func (m *APIAuthenticateReply) Reset()

func (*APIAuthenticateReply) String

func (m *APIAuthenticateReply) String() string

type APIAuthenticateRequest

type APIAuthenticateRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
}

func (*APIAuthenticateRequest) Descriptor

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

func (*APIAuthenticateRequest) GetPassword

func (m *APIAuthenticateRequest) GetPassword() string

func (*APIAuthenticateRequest) GetUsername

func (m *APIAuthenticateRequest) GetUsername() string

func (*APIAuthenticateRequest) ProtoMessage

func (*APIAuthenticateRequest) ProtoMessage()

func (*APIAuthenticateRequest) Reset

func (m *APIAuthenticateRequest) Reset()

func (*APIAuthenticateRequest) String

func (m *APIAuthenticateRequest) String() string

type APIClient

type APIClient interface {
	// Sends a api request to process an URL
	Submit(ctx context.Context, in *APISubmitRequest, opts ...grpc.CallOption) (*APISubmitReply, error)
	// Gets a response for an URL
	Get(ctx context.Context, in *APIGetRequest, opts ...grpc.CallOption) (*APIGetReply, error)
	// Sends a authentication request
	Authenticate(ctx context.Context, in *APIAuthenticateRequest, opts ...grpc.CallOption) (*APIAuthenticateReply, error)
	// Sends a validaton request
	Validate(ctx context.Context, in *APIValidateRequest, opts ...grpc.CallOption) (*APIValidateReply, error)
}

func NewAPIClient

func NewAPIClient(cc *grpc.ClientConn) APIClient

type APIGetReply

type APIGetReply struct {
	Urls []string `protobuf:"bytes,1,rep,name=urls" json:"urls,omitempty"`
}

func (*APIGetReply) Descriptor

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

func (*APIGetReply) GetUrls

func (m *APIGetReply) GetUrls() []string

func (*APIGetReply) ProtoMessage

func (*APIGetReply) ProtoMessage()

func (*APIGetReply) Reset

func (m *APIGetReply) Reset()

func (*APIGetReply) String

func (m *APIGetReply) String() string

type APIGetRequest

type APIGetRequest struct {
	Session string `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
	Url     string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
}

Get url crawl results with session credentials

func (*APIGetRequest) Descriptor

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

func (*APIGetRequest) GetSession

func (m *APIGetRequest) GetSession() string

func (*APIGetRequest) GetUrl

func (m *APIGetRequest) GetUrl() string

func (*APIGetRequest) ProtoMessage

func (*APIGetRequest) ProtoMessage()

func (*APIGetRequest) Reset

func (m *APIGetRequest) Reset()

func (*APIGetRequest) String

func (m *APIGetRequest) String() string

type APIServer

type APIServer interface {
	// Sends a api request to process an URL
	Submit(context.Context, *APISubmitRequest) (*APISubmitReply, error)
	// Gets a response for an URL
	Get(context.Context, *APIGetRequest) (*APIGetReply, error)
	// Sends a authentication request
	Authenticate(context.Context, *APIAuthenticateRequest) (*APIAuthenticateReply, error)
	// Sends a validaton request
	Validate(context.Context, *APIValidateRequest) (*APIValidateReply, error)
}

type APISubmitReply

type APISubmitReply struct {
	Job string `protobuf:"bytes,1,opt,name=job" json:"job,omitempty"`
}

func (*APISubmitReply) Descriptor

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

func (*APISubmitReply) GetJob

func (m *APISubmitReply) GetJob() string

func (*APISubmitReply) ProtoMessage

func (*APISubmitReply) ProtoMessage()

func (*APISubmitReply) Reset

func (m *APISubmitReply) Reset()

func (*APISubmitReply) String

func (m *APISubmitReply) String() string

type APISubmitRequest

type APISubmitRequest struct {
	Session string `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
	Url     string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
}

Request url crawl with session credentials

func (*APISubmitRequest) Descriptor

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

func (*APISubmitRequest) GetSession

func (m *APISubmitRequest) GetSession() string

func (*APISubmitRequest) GetUrl

func (m *APISubmitRequest) GetUrl() string

func (*APISubmitRequest) ProtoMessage

func (*APISubmitRequest) ProtoMessage()

func (*APISubmitRequest) Reset

func (m *APISubmitRequest) Reset()

func (*APISubmitRequest) String

func (m *APISubmitRequest) String() string

type APIValidateReply

type APIValidateReply struct {
	Valid bool `protobuf:"varint,1,opt,name=valid" json:"valid,omitempty"`
}

func (*APIValidateReply) Descriptor

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

func (*APIValidateReply) GetValid

func (m *APIValidateReply) GetValid() bool

func (*APIValidateReply) ProtoMessage

func (*APIValidateReply) ProtoMessage()

func (*APIValidateReply) Reset

func (m *APIValidateReply) Reset()

func (*APIValidateReply) String

func (m *APIValidateReply) String() string

type APIValidateRequest

type APIValidateRequest struct {
	Session string `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
}

func (*APIValidateRequest) Descriptor

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

func (*APIValidateRequest) GetSession

func (m *APIValidateRequest) GetSession() string

func (*APIValidateRequest) ProtoMessage

func (*APIValidateRequest) ProtoMessage()

func (*APIValidateRequest) Reset

func (m *APIValidateRequest) Reset()

func (*APIValidateRequest) String

func (m *APIValidateRequest) String() string

Jump to

Keyboard shortcuts

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