Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPaserHTTPServer(s *http.Server, srv PaserHTTPServer)
- func RegisterPaserServer(s grpc.ServiceRegistrar, srv PaserServer)
- type Part
- func (*Part) Descriptor() ([]byte, []int)deprecated
- func (x *Part) GetExt() string
- func (x *Part) GetSize() int64
- func (x *Part) GetUrl() string
- func (*Part) ProtoMessage()
- func (x *Part) ProtoReflect() protoreflect.Message
- func (x *Part) Reset()
- func (x *Part) String() string
- func (m *Part) Validate() error
- func (m *Part) ValidateAll() error
- type PartMultiError
- type PartValidationError
- type PaserClient
- type PaserHTTPClient
- type PaserHTTPClientImpl
- type PaserHTTPServer
- type PaserReply
- func (*PaserReply) Descriptor() ([]byte, []int)deprecated
- func (x *PaserReply) GetSite() string
- func (x *PaserReply) GetStreams() map[string]*Stream
- func (x *PaserReply) GetTitle() string
- func (x *PaserReply) GetType() string
- func (x *PaserReply) GetUrl() string
- func (*PaserReply) ProtoMessage()
- func (x *PaserReply) ProtoReflect() protoreflect.Message
- func (x *PaserReply) Reset()
- func (x *PaserReply) String() string
- func (m *PaserReply) Validate() error
- func (m *PaserReply) ValidateAll() error
- type PaserReplyMultiError
- type PaserReplyValidationError
- type PaserReq
- func (*PaserReq) Descriptor() ([]byte, []int)deprecated
- func (x *PaserReq) GetUrl() string
- func (*PaserReq) ProtoMessage()
- func (x *PaserReq) ProtoReflect() protoreflect.Message
- func (x *PaserReq) Reset()
- func (x *PaserReq) String() string
- func (m *PaserReq) Validate() error
- func (m *PaserReq) ValidateAll() error
- type PaserReqMultiError
- type PaserReqValidationError
- type PaserServer
- type Stream
- func (*Stream) Descriptor() ([]byte, []int)deprecated
- func (x *Stream) GetExt() string
- func (x *Stream) GetParts() []*Part
- func (x *Stream) GetQuality() string
- func (x *Stream) GetSize() int64
- func (*Stream) ProtoMessage()
- func (x *Stream) ProtoReflect() protoreflect.Message
- func (x *Stream) Reset()
- func (x *Stream) String() string
- func (m *Stream) Validate() error
- func (m *Stream) ValidateAll() error
- type StreamMultiError
- type StreamValidationError
- type UnimplementedPaserServer
- type UnsafePaserServer
Constants ¶
const OperationPaserPaser = "/paser.service.v1.Paser/Paser"
Variables ¶
var File_paser_service_v1_paser_proto protoreflect.FileDescriptor
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) ProtoMessage ¶
func (*Part) ProtoMessage()
func (*Part) ProtoReflect ¶
func (x *Part) ProtoReflect() protoreflect.Message
func (*Part) Validate ¶
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 ¶
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 ¶
func (e PaserReplyValidationError) Error() string
Error satisfies the builtin error interface
func (PaserReplyValidationError) ErrorName ¶
func (e PaserReplyValidationError) ErrorName() string
ErrorName returns error name.
func (PaserReplyValidationError) Field ¶
func (e PaserReplyValidationError) Field() string
Field function returns field value.
func (PaserReplyValidationError) Key ¶
func (e PaserReplyValidationError) Key() bool
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) ProtoMessage ¶
func (*PaserReq) ProtoMessage()
func (*PaserReq) ProtoReflect ¶
func (x *PaserReq) ProtoReflect() protoreflect.Message
func (*PaserReq) Validate ¶
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 ¶
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) GetQuality ¶
func (*Stream) ProtoMessage ¶
func (*Stream) ProtoMessage()
func (*Stream) ProtoReflect ¶
func (x *Stream) ProtoReflect() protoreflect.Message
func (*Stream) Validate ¶
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 ¶
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 ¶
func (UnimplementedPaserServer) Paser(context.Context, *PaserReq) (*PaserReply, error)
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.