v1

package
v0.0.0-...-9bd63dd Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const OperationPaserPaser = "/paser.service.v1.Paser/Paser"

Variables

View Source
var File_paser_service_v1_paser_proto protoreflect.FileDescriptor
View Source
var Paser_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "paser.service.v1.Paser",
	HandlerType: (*PaserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Paser",
			Handler:    _Paser_Paser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "paser/service/v1/paser.proto",
}

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

Functions

func RegisterPaserHTTPServer

func RegisterPaserHTTPServer(s *http.Server, srv PaserHTTPServer)

func RegisterPaserServer

func RegisterPaserServer(s grpc.ServiceRegistrar, srv PaserServer)

Types

type Part

type Part struct {
	Size int64  `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	Url  string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	Ext  string `protobuf:"bytes,3,opt,name=ext,proto3" json:"ext,omitempty"`
	// contains filtered or unexported fields
}

func (*Part) Descriptor deprecated

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

Deprecated: Use Part.ProtoReflect.Descriptor instead.

func (*Part) GetExt

func (x *Part) GetExt() string

func (*Part) GetSize

func (x *Part) GetSize() int64

func (*Part) GetUrl

func (x *Part) GetUrl() string

func (*Part) ProtoMessage

func (*Part) ProtoMessage()

func (*Part) ProtoReflect

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

func (*Part) Reset

func (x *Part) Reset()

func (*Part) String

func (x *Part) String() string

func (*Part) Validate

func (m *Part) Validate() error

Validate checks the field values on Part with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Part) ValidateAll

func (m *Part) ValidateAll() error

ValidateAll checks the field values on Part with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PartMultiError, or nil if none found.

type PartMultiError

type PartMultiError []error

PartMultiError is an error wrapping multiple validation errors returned by Part.ValidateAll() if the designated constraints aren't met.

func (PartMultiError) AllErrors

func (m PartMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PartMultiError) Error

func (m PartMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PartValidationError

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

PartValidationError is the validation error returned by Part.Validate if the designated constraints aren't met.

func (PartValidationError) Cause

func (e PartValidationError) Cause() error

Cause function returns cause value.

func (PartValidationError) Error

func (e PartValidationError) Error() string

Error satisfies the builtin error interface

func (PartValidationError) ErrorName

func (e PartValidationError) ErrorName() string

ErrorName returns error name.

func (PartValidationError) Field

func (e PartValidationError) Field() string

Field function returns field value.

func (PartValidationError) Key

func (e PartValidationError) Key() bool

Key function returns key value.

func (PartValidationError) Reason

func (e PartValidationError) Reason() string

Reason function returns reason value.

type PaserClient

type PaserClient interface {
	Paser(ctx context.Context, in *PaserReq, opts ...grpc.CallOption) (*PaserReply, error)
}

PaserClient is the client API for Paser 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 NewPaserClient

func NewPaserClient(cc grpc.ClientConnInterface) PaserClient

type PaserHTTPClient

type PaserHTTPClient interface {
	Paser(ctx context.Context, req *PaserReq, opts ...http.CallOption) (rsp *PaserReply, err error)
}

func NewPaserHTTPClient

func NewPaserHTTPClient(client *http.Client) PaserHTTPClient

type PaserHTTPClientImpl

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

func (*PaserHTTPClientImpl) Paser

func (c *PaserHTTPClientImpl) Paser(ctx context.Context, in *PaserReq, opts ...http.CallOption) (*PaserReply, error)

type PaserHTTPServer

type PaserHTTPServer interface {
	Paser(context.Context, *PaserReq) (*PaserReply, error)
}

type PaserReply

type PaserReply struct {
	Site    string             `protobuf:"bytes,1,opt,name=site,proto3" json:"site,omitempty"`
	Title   string             `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Type    string             `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Streams map[string]*Stream `` /* 155-byte string literal not displayed */
	Url     string             `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*PaserReply) Descriptor deprecated

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

Deprecated: Use PaserReply.ProtoReflect.Descriptor instead.

func (*PaserReply) GetSite

func (x *PaserReply) GetSite() string

func (*PaserReply) GetStreams

func (x *PaserReply) GetStreams() map[string]*Stream

func (*PaserReply) GetTitle

func (x *PaserReply) GetTitle() string

func (*PaserReply) GetType

func (x *PaserReply) GetType() string

func (*PaserReply) GetUrl

func (x *PaserReply) GetUrl() string

func (*PaserReply) ProtoMessage

func (*PaserReply) ProtoMessage()

func (*PaserReply) ProtoReflect

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

func (*PaserReply) Reset

func (x *PaserReply) Reset()

func (*PaserReply) String

func (x *PaserReply) String() string

func (*PaserReply) Validate

func (m *PaserReply) Validate() error

Validate checks the field values on PaserReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PaserReply) ValidateAll

func (m *PaserReply) ValidateAll() error

ValidateAll checks the field values on PaserReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaserReplyMultiError, or nil if none found.

type PaserReplyMultiError

type PaserReplyMultiError []error

PaserReplyMultiError is an error wrapping multiple validation errors returned by PaserReply.ValidateAll() if the designated constraints aren't met.

func (PaserReplyMultiError) AllErrors

func (m PaserReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PaserReplyMultiError) Error

func (m PaserReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PaserReplyValidationError

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

PaserReplyValidationError is the validation error returned by PaserReply.Validate if the designated constraints aren't met.

func (PaserReplyValidationError) Cause

func (e PaserReplyValidationError) Cause() error

Cause function returns cause value.

func (PaserReplyValidationError) Error

Error satisfies the builtin error interface

func (PaserReplyValidationError) ErrorName

func (e PaserReplyValidationError) ErrorName() string

ErrorName returns error name.

func (PaserReplyValidationError) Field

Field function returns field value.

func (PaserReplyValidationError) Key

Key function returns key value.

func (PaserReplyValidationError) Reason

func (e PaserReplyValidationError) Reason() string

Reason function returns reason value.

type PaserReq

type PaserReq struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*PaserReq) Descriptor deprecated

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

Deprecated: Use PaserReq.ProtoReflect.Descriptor instead.

func (*PaserReq) GetUrl

func (x *PaserReq) GetUrl() string

func (*PaserReq) ProtoMessage

func (*PaserReq) ProtoMessage()

func (*PaserReq) ProtoReflect

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

func (*PaserReq) Reset

func (x *PaserReq) Reset()

func (*PaserReq) String

func (x *PaserReq) String() string

func (*PaserReq) Validate

func (m *PaserReq) Validate() error

Validate checks the field values on PaserReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PaserReq) ValidateAll

func (m *PaserReq) ValidateAll() error

ValidateAll checks the field values on PaserReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaserReqMultiError, or nil if none found.

type PaserReqMultiError

type PaserReqMultiError []error

PaserReqMultiError is an error wrapping multiple validation errors returned by PaserReq.ValidateAll() if the designated constraints aren't met.

func (PaserReqMultiError) AllErrors

func (m PaserReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PaserReqMultiError) Error

func (m PaserReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PaserReqValidationError

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

PaserReqValidationError is the validation error returned by PaserReq.Validate if the designated constraints aren't met.

func (PaserReqValidationError) Cause

func (e PaserReqValidationError) Cause() error

Cause function returns cause value.

func (PaserReqValidationError) Error

func (e PaserReqValidationError) Error() string

Error satisfies the builtin error interface

func (PaserReqValidationError) ErrorName

func (e PaserReqValidationError) ErrorName() string

ErrorName returns error name.

func (PaserReqValidationError) Field

func (e PaserReqValidationError) Field() string

Field function returns field value.

func (PaserReqValidationError) Key

func (e PaserReqValidationError) Key() bool

Key function returns key value.

func (PaserReqValidationError) Reason

func (e PaserReqValidationError) Reason() string

Reason function returns reason value.

type PaserServer

type PaserServer interface {
	Paser(context.Context, *PaserReq) (*PaserReply, error)
	// contains filtered or unexported methods
}

PaserServer is the server API for Paser service. All implementations must embed UnimplementedPaserServer for forward compatibility

type Stream

type Stream struct {
	Quality string  `protobuf:"bytes,1,opt,name=quality,proto3" json:"quality,omitempty"`
	Parts   []*Part `protobuf:"bytes,2,rep,name=parts,proto3" json:"parts,omitempty"`
	Size    int64   `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	Ext     string  `protobuf:"bytes,4,opt,name=ext,proto3" json:"ext,omitempty"`
	// contains filtered or unexported fields
}

func (*Stream) Descriptor deprecated

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

Deprecated: Use Stream.ProtoReflect.Descriptor instead.

func (*Stream) GetExt

func (x *Stream) GetExt() string

func (*Stream) GetParts

func (x *Stream) GetParts() []*Part

func (*Stream) GetQuality

func (x *Stream) GetQuality() string

func (*Stream) GetSize

func (x *Stream) GetSize() int64

func (*Stream) ProtoMessage

func (*Stream) ProtoMessage()

func (*Stream) ProtoReflect

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

func (*Stream) Reset

func (x *Stream) Reset()

func (*Stream) String

func (x *Stream) String() string

func (*Stream) Validate

func (m *Stream) Validate() error

Validate checks the field values on Stream with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Stream) ValidateAll

func (m *Stream) ValidateAll() error

ValidateAll checks the field values on Stream with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StreamMultiError, or nil if none found.

type StreamMultiError

type StreamMultiError []error

StreamMultiError is an error wrapping multiple validation errors returned by Stream.ValidateAll() if the designated constraints aren't met.

func (StreamMultiError) AllErrors

func (m StreamMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (StreamMultiError) Error

func (m StreamMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type StreamValidationError

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

StreamValidationError is the validation error returned by Stream.Validate if the designated constraints aren't met.

func (StreamValidationError) Cause

func (e StreamValidationError) Cause() error

Cause function returns cause value.

func (StreamValidationError) Error

func (e StreamValidationError) Error() string

Error satisfies the builtin error interface

func (StreamValidationError) ErrorName

func (e StreamValidationError) ErrorName() string

ErrorName returns error name.

func (StreamValidationError) Field

func (e StreamValidationError) Field() string

Field function returns field value.

func (StreamValidationError) Key

func (e StreamValidationError) Key() bool

Key function returns key value.

func (StreamValidationError) Reason

func (e StreamValidationError) Reason() string

Reason function returns reason value.

type UnimplementedPaserServer

type UnimplementedPaserServer struct {
}

UnimplementedPaserServer must be embedded to have forward compatible implementations.

func (UnimplementedPaserServer) Paser

type UnsafePaserServer

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

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

Jump to

Keyboard shortcuts

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