v1

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Action_name = map[int32]string{
		0: "SEARCH",
		1: "DOWNLOAD",
		2: "SCRAPE",
	}
	Action_value = map[string]int32{
		"SEARCH":   0,
		"DOWNLOAD": 1,
		"SCRAPE":   2,
	}
)

Enum value maps for Action.

View Source
var (
	Status_name = map[int32]string{
		0: "STOPPED",
		1: "STARTED",
	}
	Status_value = map[string]int32{
		"STOPPED": 0,
		"STARTED": 1,
	}
)

Enum value maps for Status.

View Source
var (
	Action_name = map[int32]string{
		0: "SEARCH",
		1: "DOWNLOAD",
		2: "SCRAPE",
	}
	Action_value = map[string]int32{
		"SEARCH":   0,
		"DOWNLOAD": 1,
		"SCRAPE":   2,
	}
)

Enum value maps for Action.

View Source
var (
	Status_name = map[int32]string{
		0: "STOPPED",
		1: "STARTED",
	}
	Status_value = map[string]int32{
		"STOPPED": 0,
		"STARTED": 1,
	}
)

Enum value maps for Status.

View Source
var CrawlerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tickerscraper.v1.CrawlerService",
	HandlerType: (*CrawlerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateCrawler",
			Handler:    _CrawlerService_CreateCrawler_Handler,
		},
		{
			MethodName: "ListCrawler",
			Handler:    _CrawlerService_ListCrawler_Handler,
		},
		{
			MethodName: "StartCrawler",
			Handler:    _CrawlerService_StartCrawler_Handler,
		},
		{
			MethodName: "StopCrawler",
			Handler:    _CrawlerService_StopCrawler_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api.proto",
}

CrawlerService_ServiceDesc is the grpc.ServiceDesc for CrawlerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_crawler_proto protoreflect.FileDescriptor
View Source
var File_enqueuer_proto protoreflect.FileDescriptor

Functions

func RegisterCrawlerServiceServer added in v0.24.2

func RegisterCrawlerServiceServer(s grpc.ServiceRegistrar, srv CrawlerServiceServer)

Types

type Action added in v0.24.2

type Action int32
const (
	Action_SEARCH   Action = 0
	Action_DOWNLOAD Action = 1
	Action_SCRAPE   Action = 2
)
const (
	Action_SEARCH   Action = 0
	Action_DOWNLOAD Action = 1
	Action_SCRAPE   Action = 2
)

func (Action) Descriptor added in v0.24.2

func (Action) Descriptor() protoreflect.EnumDescriptor

func (Action) Enum added in v0.24.2

func (x Action) Enum() *Action

func (Action) EnumDescriptor deprecated added in v0.24.2

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

Deprecated: Use Action.Descriptor instead.

func (Action) Number added in v0.24.2

func (x Action) Number() protoreflect.EnumNumber

func (Action) String added in v0.24.2

func (x Action) String() string

func (Action) Type added in v0.24.2

func (Action) Type() protoreflect.EnumType

type AllowedDomain

type AllowedDomain struct {
	Domain            string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
	UrlRegexValidator string `protobuf:"bytes,2,opt,name=url_regex_validator,json=urlRegexValidator,proto3" json:"url_regex_validator,omitempty"`
	// contains filtered or unexported fields
}

func (*AllowedDomain) Descriptor deprecated

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

Deprecated: Use AllowedDomain.ProtoReflect.Descriptor instead.

func (*AllowedDomain) GetDomain

func (x *AllowedDomain) GetDomain() string

func (*AllowedDomain) GetUrlRegexValidator

func (x *AllowedDomain) GetUrlRegexValidator() string

func (*AllowedDomain) ProtoMessage

func (*AllowedDomain) ProtoMessage()

func (*AllowedDomain) ProtoReflect

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

func (*AllowedDomain) Reset

func (x *AllowedDomain) Reset()

func (*AllowedDomain) String

func (x *AllowedDomain) String() string

type Crawler added in v0.24.2

type Crawler struct {
	SourceId          int32                  `protobuf:"varint,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
	StartUrl          string                 `protobuf:"bytes,2,opt,name=start_url,json=startUrl,proto3" json:"start_url,omitempty"`
	AllowedDomain     []string               `protobuf:"bytes,3,rep,name=allowed_domain,json=allowedDomain,proto3" json:"allowed_domain,omitempty"`
	DurationInMinutes uint32                 `protobuf:"varint,4,opt,name=duration_in_minutes,json=durationInMinutes,proto3" json:"duration_in_minutes,omitempty"`
	MaxDepth          uint32                 `protobuf:"varint,5,opt,name=max_depth,json=maxDepth,proto3" json:"max_depth,omitempty"`
	Status            Status                 `protobuf:"varint,6,opt,name=status,proto3,enum=tickerscraper.v1.Status" json:"status,omitempty"`
	Rules             []*Rule                `protobuf:"bytes,7,rep,name=rules,proto3" json:"rules,omitempty"`
	Modified          *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=modified,proto3" json:"modified,omitempty"`
	DisallowedDomain  []string               `protobuf:"bytes,9,rep,name=disallowed_domain,json=disallowedDomain,proto3" json:"disallowed_domain,omitempty"`
	UrlRegexFilter    []string               `protobuf:"bytes,10,rep,name=url_regex_filter,json=urlRegexFilter,proto3" json:"url_regex_filter,omitempty"`
	// contains filtered or unexported fields
}

Deal: A deal is the reflection of the fact of a trade operation execution based on an order that contains a trade request

func (*Crawler) Descriptor deprecated added in v0.24.2

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

Deprecated: Use Crawler.ProtoReflect.Descriptor instead.

func (*Crawler) GetAllowedDomain added in v0.24.2

func (x *Crawler) GetAllowedDomain() []string

func (*Crawler) GetDisallowedDomain added in v0.24.2

func (x *Crawler) GetDisallowedDomain() []string

func (*Crawler) GetDurationInMinutes added in v0.24.2

func (x *Crawler) GetDurationInMinutes() uint32

func (*Crawler) GetMaxDepth added in v0.24.2

func (x *Crawler) GetMaxDepth() uint32

func (*Crawler) GetModified added in v0.24.2

func (x *Crawler) GetModified() *timestamppb.Timestamp

func (*Crawler) GetRules added in v0.24.2

func (x *Crawler) GetRules() []*Rule

func (*Crawler) GetSourceId added in v0.24.2

func (x *Crawler) GetSourceId() int32

func (*Crawler) GetStartUrl added in v0.24.2

func (x *Crawler) GetStartUrl() string

func (*Crawler) GetStatus added in v0.24.2

func (x *Crawler) GetStatus() Status

func (*Crawler) GetUrlRegexFilter added in v0.24.2

func (x *Crawler) GetUrlRegexFilter() []string

func (*Crawler) ProtoMessage added in v0.24.2

func (*Crawler) ProtoMessage()

func (*Crawler) ProtoReflect added in v0.24.2

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

func (*Crawler) Reset added in v0.24.2

func (x *Crawler) Reset()

func (*Crawler) String added in v0.24.2

func (x *Crawler) String() string

type CrawlerMessage added in v0.24.2

type CrawlerMessage struct {
	Crawler *Crawler `protobuf:"bytes,1,opt,name=crawler,proto3" json:"crawler,omitempty"`
	// contains filtered or unexported fields
}

func (*CrawlerMessage) Descriptor deprecated added in v0.24.2

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

Deprecated: Use CrawlerMessage.ProtoReflect.Descriptor instead.

func (*CrawlerMessage) GetCrawler added in v0.24.2

func (x *CrawlerMessage) GetCrawler() *Crawler

func (*CrawlerMessage) ProtoMessage added in v0.24.2

func (*CrawlerMessage) ProtoMessage()

func (*CrawlerMessage) ProtoReflect added in v0.24.2

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

func (*CrawlerMessage) Reset added in v0.24.2

func (x *CrawlerMessage) Reset()

func (*CrawlerMessage) String added in v0.24.2

func (x *CrawlerMessage) String() string

type CrawlerServiceClient added in v0.24.2

type CrawlerServiceClient interface {
	CreateCrawler(ctx context.Context, in *CrawlerMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListCrawler(ctx context.Context, in *SourceIdMessage, opts ...grpc.CallOption) (*CrawlerMessage, error)
	StartCrawler(ctx context.Context, in *SourceIdMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
	StopCrawler(ctx context.Context, in *SourceIdMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

CrawlerServiceClient is the client API for CrawlerService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCrawlerServiceClient added in v0.24.2

func NewCrawlerServiceClient(cc grpc.ClientConnInterface) CrawlerServiceClient

type CrawlerServiceServer added in v0.24.2

type CrawlerServiceServer interface {
	CreateCrawler(context.Context, *CrawlerMessage) (*emptypb.Empty, error)
	ListCrawler(context.Context, *SourceIdMessage) (*CrawlerMessage, error)
	StartCrawler(context.Context, *SourceIdMessage) (*emptypb.Empty, error)
	StopCrawler(context.Context, *SourceIdMessage) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

CrawlerServiceServer is the server API for CrawlerService service. All implementations must embed UnimplementedCrawlerServiceServer for forward compatibility

type Enqueuer

type Enqueuer struct {
	SourceId          int32                  `protobuf:"varint,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
	StartUrl          string                 `protobuf:"bytes,2,opt,name=start_url,json=startUrl,proto3" json:"start_url,omitempty"`
	AllowedDomain     []*AllowedDomain       `protobuf:"bytes,3,rep,name=allowed_domain,json=allowedDomain,proto3" json:"allowed_domain,omitempty"`
	DurationInMinutes uint32                 `protobuf:"varint,4,opt,name=duration_in_minutes,json=durationInMinutes,proto3" json:"duration_in_minutes,omitempty"`
	MaxDepth          uint32                 `protobuf:"varint,5,opt,name=max_depth,json=maxDepth,proto3" json:"max_depth,omitempty"`
	Status            Status                 `protobuf:"varint,6,opt,name=status,proto3,enum=tickerscraper.v1.Status" json:"status,omitempty"`
	Rules             []*Rule                `protobuf:"bytes,7,rep,name=rules,proto3" json:"rules,omitempty"`
	Modified          *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=modified,proto3" json:"modified,omitempty"`
	// contains filtered or unexported fields
}

Deal: A deal is the reflection of the fact of a trade operation execution based on an order that contains a trade request

func (*Enqueuer) Descriptor deprecated

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

Deprecated: Use Enqueuer.ProtoReflect.Descriptor instead.

func (*Enqueuer) GetAllowedDomain

func (x *Enqueuer) GetAllowedDomain() []*AllowedDomain

func (*Enqueuer) GetDurationInMinutes

func (x *Enqueuer) GetDurationInMinutes() uint32

func (*Enqueuer) GetMaxDepth

func (x *Enqueuer) GetMaxDepth() uint32

func (*Enqueuer) GetModified

func (x *Enqueuer) GetModified() *timestamppb.Timestamp

func (*Enqueuer) GetRules

func (x *Enqueuer) GetRules() []*Rule

func (*Enqueuer) GetSourceId

func (x *Enqueuer) GetSourceId() int32

func (*Enqueuer) GetStartUrl

func (x *Enqueuer) GetStartUrl() string

func (*Enqueuer) GetStatus

func (x *Enqueuer) GetStatus() Status

func (*Enqueuer) ProtoMessage

func (*Enqueuer) ProtoMessage()

func (*Enqueuer) ProtoReflect

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

func (*Enqueuer) Reset

func (x *Enqueuer) Reset()

func (*Enqueuer) String

func (x *Enqueuer) String() string

type Rule

type Rule struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Action    Action `protobuf:"varint,2,opt,name=action,proto3,enum=tickerscraper.v1.Action" json:"action,omitempty"`
	Selector  string `protobuf:"bytes,3,opt,name=selector,proto3" json:"selector,omitempty"`
	Attribute string `protobuf:"bytes,4,opt,name=attribute,proto3" json:"attribute,omitempty"`
	// contains filtered or unexported fields
}

func (*Rule) Descriptor deprecated

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

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetAction

func (x *Rule) GetAction() Action

func (*Rule) GetAttribute

func (x *Rule) GetAttribute() string

func (*Rule) GetName

func (x *Rule) GetName() string

func (*Rule) GetSelector

func (x *Rule) GetSelector() string

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

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

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

type SourceIdMessage

type SourceIdMessage struct {
	SourceId int32 `protobuf:"varint,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
	// contains filtered or unexported fields
}

func (*SourceIdMessage) Descriptor deprecated

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

Deprecated: Use SourceIdMessage.ProtoReflect.Descriptor instead.

func (*SourceIdMessage) GetSourceId

func (x *SourceIdMessage) GetSourceId() int32

func (*SourceIdMessage) ProtoMessage

func (*SourceIdMessage) ProtoMessage()

func (*SourceIdMessage) ProtoReflect

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

func (*SourceIdMessage) Reset

func (x *SourceIdMessage) Reset()

func (*SourceIdMessage) String

func (x *SourceIdMessage) String() string

type Status

type Status int32
const (
	Status_STOPPED Status = 0
	Status_STARTED Status = 1
)
const (
	Status_STOPPED Status = 0
	Status_STARTED Status = 1
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedCrawlerServiceServer added in v0.24.2

type UnimplementedCrawlerServiceServer struct {
}

UnimplementedCrawlerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCrawlerServiceServer) CreateCrawler added in v0.24.2

func (UnimplementedCrawlerServiceServer) ListCrawler added in v0.24.2

func (UnimplementedCrawlerServiceServer) StartCrawler added in v0.24.2

func (UnimplementedCrawlerServiceServer) StopCrawler added in v0.24.2

type UnsafeCrawlerServiceServer added in v0.24.2

type UnsafeCrawlerServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCrawlerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CrawlerServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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