backend

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2017 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Overview

Package backend is a generated protocol buffer package.

It is generated from these files:

backend.proto

It has these top-level messages:

ScrapeReq
ScrapeResp
PinReq
PinResp

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBackend = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBackend   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterBackendServiceServer

func RegisterBackendServiceServer(s *grpc.Server, srv BackendServiceServer)

Types

type BackendServer

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

func (*BackendServer) Pin

func (b *BackendServer) Pin(ctx netctx.Context, req *PinReq) (*PinResp, error)

func (*BackendServer) Scrape

func (b *BackendServer) Scrape(ctx netctx.Context, req *ScrapeReq) (*ScrapeResp, error)

type BackendServiceClient

type BackendServiceClient interface {
	Pin(ctx context.Context, in *PinReq, opts ...grpc.CallOption) (*PinResp, error)
	Scrape(ctx context.Context, in *ScrapeReq, opts ...grpc.CallOption) (*ScrapeResp, error)
}

func NewBackendServiceClient

func NewBackendServiceClient(cc *grpc.ClientConn) BackendServiceClient

type BackendServiceServer

type BackendServiceServer interface {
	Pin(context.Context, *PinReq) (*PinResp, error)
	Scrape(context.Context, *ScrapeReq) (*ScrapeResp, error)
}

func NewServer

func NewServer(ctx context.Context, logger *zap.Logger) BackendServiceServer

type PinReq

type PinReq struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
}

func (*PinReq) Descriptor

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

func (*PinReq) Equal

func (this *PinReq) Equal(that interface{}) bool

func (*PinReq) GetHash

func (m *PinReq) GetHash() string

func (*PinReq) GetId

func (m *PinReq) GetId() string

func (*PinReq) GoString

func (this *PinReq) GoString() string

func (*PinReq) Marshal

func (m *PinReq) Marshal() (dAtA []byte, err error)

func (*PinReq) MarshalTo

func (m *PinReq) MarshalTo(dAtA []byte) (int, error)

func (*PinReq) ProtoMessage

func (*PinReq) ProtoMessage()

func (*PinReq) Reset

func (m *PinReq) Reset()

func (*PinReq) Size

func (m *PinReq) Size() (n int)

func (*PinReq) String

func (this *PinReq) String() string

func (*PinReq) Unmarshal

func (m *PinReq) Unmarshal(dAtA []byte) error

type PinResp

type PinResp struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*PinResp) Descriptor

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

func (*PinResp) Equal

func (this *PinResp) Equal(that interface{}) bool

func (*PinResp) GetId

func (m *PinResp) GetId() string

func (*PinResp) GoString

func (this *PinResp) GoString() string

func (*PinResp) Marshal

func (m *PinResp) Marshal() (dAtA []byte, err error)

func (*PinResp) MarshalTo

func (m *PinResp) MarshalTo(dAtA []byte) (int, error)

func (*PinResp) ProtoMessage

func (*PinResp) ProtoMessage()

func (*PinResp) Reset

func (m *PinResp) Reset()

func (*PinResp) Size

func (m *PinResp) Size() (n int)

func (*PinResp) String

func (this *PinResp) String() string

func (*PinResp) Unmarshal

func (m *PinResp) Unmarshal(dAtA []byte) error

type ScrapeReq

type ScrapeReq struct {
	Id  string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
}

func (*ScrapeReq) Descriptor

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

func (*ScrapeReq) Equal

func (this *ScrapeReq) Equal(that interface{}) bool

func (*ScrapeReq) GetId

func (m *ScrapeReq) GetId() string

func (*ScrapeReq) GetUrl

func (m *ScrapeReq) GetUrl() string

func (*ScrapeReq) GoString

func (this *ScrapeReq) GoString() string

func (*ScrapeReq) Marshal

func (m *ScrapeReq) Marshal() (dAtA []byte, err error)

func (*ScrapeReq) MarshalTo

func (m *ScrapeReq) MarshalTo(dAtA []byte) (int, error)

func (*ScrapeReq) ProtoMessage

func (*ScrapeReq) ProtoMessage()

func (*ScrapeReq) Reset

func (m *ScrapeReq) Reset()

func (*ScrapeReq) Size

func (m *ScrapeReq) Size() (n int)

func (*ScrapeReq) String

func (this *ScrapeReq) String() string

func (*ScrapeReq) Unmarshal

func (m *ScrapeReq) Unmarshal(dAtA []byte) error

type ScrapeResp

type ScrapeResp struct {
	Id         string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ArchiveUrl string `protobuf:"bytes,2,opt,name=archive_url,json=archiveUrl,proto3" json:"archive_url,omitempty"`
	Hash       string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
}

func (*ScrapeResp) Descriptor

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

func (*ScrapeResp) Equal

func (this *ScrapeResp) Equal(that interface{}) bool

func (*ScrapeResp) GetArchiveUrl

func (m *ScrapeResp) GetArchiveUrl() string

func (*ScrapeResp) GetHash

func (m *ScrapeResp) GetHash() string

func (*ScrapeResp) GetId

func (m *ScrapeResp) GetId() string

func (*ScrapeResp) GoString

func (this *ScrapeResp) GoString() string

func (*ScrapeResp) Marshal

func (m *ScrapeResp) Marshal() (dAtA []byte, err error)

func (*ScrapeResp) MarshalTo

func (m *ScrapeResp) MarshalTo(dAtA []byte) (int, error)

func (*ScrapeResp) ProtoMessage

func (*ScrapeResp) ProtoMessage()

func (*ScrapeResp) Reset

func (m *ScrapeResp) Reset()

func (*ScrapeResp) Size

func (m *ScrapeResp) Size() (n int)

func (*ScrapeResp) String

func (this *ScrapeResp) String() string

func (*ScrapeResp) Unmarshal

func (m *ScrapeResp) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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