Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterURLShortenerServer(s grpc.ServiceRegistrar, srv URLShortenerServer)
- type DeleteUserURLsRequest
- func (x *DeleteUserURLsRequest) ClearUserId()
- func (x *DeleteUserURLsRequest) GetShortUrlIds() []string
- func (x *DeleteUserURLsRequest) GetUserId() string
- func (x *DeleteUserURLsRequest) HasUserId() bool
- func (*DeleteUserURLsRequest) ProtoMessage()
- func (x *DeleteUserURLsRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteUserURLsRequest) Reset()
- func (x *DeleteUserURLsRequest) SetShortUrlIds(v []string)
- func (x *DeleteUserURLsRequest) SetUserId(v string)
- func (x *DeleteUserURLsRequest) String() string
- type DeleteUserURLsRequest_builder
- type DeleteUserURLsResponse
- func (x *DeleteUserURLsResponse) ClearSuccess()
- func (x *DeleteUserURLsResponse) GetSuccess() bool
- func (x *DeleteUserURLsResponse) HasSuccess() bool
- func (*DeleteUserURLsResponse) ProtoMessage()
- func (x *DeleteUserURLsResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteUserURLsResponse) Reset()
- func (x *DeleteUserURLsResponse) SetSuccess(v bool)
- func (x *DeleteUserURLsResponse) String() string
- type DeleteUserURLsResponse_builder
- type ExpandRequest
- func (x *ExpandRequest) ClearShortUrlId()
- func (x *ExpandRequest) GetShortUrlId() string
- func (x *ExpandRequest) HasShortUrlId() bool
- func (*ExpandRequest) ProtoMessage()
- func (x *ExpandRequest) ProtoReflect() protoreflect.Message
- func (x *ExpandRequest) Reset()
- func (x *ExpandRequest) SetShortUrlId(v string)
- func (x *ExpandRequest) String() string
- type ExpandRequest_builder
- type ExpandResponse
- func (x *ExpandResponse) ClearOriginalUrl()
- func (x *ExpandResponse) GetOriginalUrl() string
- func (x *ExpandResponse) HasOriginalUrl() bool
- func (*ExpandResponse) ProtoMessage()
- func (x *ExpandResponse) ProtoReflect() protoreflect.Message
- func (x *ExpandResponse) Reset()
- func (x *ExpandResponse) SetOriginalUrl(v string)
- func (x *ExpandResponse) String() string
- type ExpandResponse_builder
- type HealthCheckRequest
- type HealthCheckRequest_builder
- type HealthCheckResponse
- func (x *HealthCheckResponse) ClearStatus()
- func (x *HealthCheckResponse) GetStatus() string
- func (x *HealthCheckResponse) HasStatus() bool
- func (*HealthCheckResponse) ProtoMessage()
- func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
- func (x *HealthCheckResponse) Reset()
- func (x *HealthCheckResponse) SetStatus(v string)
- func (x *HealthCheckResponse) String() string
- type HealthCheckResponse_builder
- type ListUserURLsRequest
- func (x *ListUserURLsRequest) ClearUserId()
- func (x *ListUserURLsRequest) GetUserId() string
- func (x *ListUserURLsRequest) HasUserId() bool
- func (*ListUserURLsRequest) ProtoMessage()
- func (x *ListUserURLsRequest) ProtoReflect() protoreflect.Message
- func (x *ListUserURLsRequest) Reset()
- func (x *ListUserURLsRequest) SetUserId(v string)
- func (x *ListUserURLsRequest) String() string
- type ListUserURLsRequest_builder
- type ListUserURLsResponse
- func (x *ListUserURLsResponse) GetUrls() []*URLPair
- func (*ListUserURLsResponse) ProtoMessage()
- func (x *ListUserURLsResponse) ProtoReflect() protoreflect.Message
- func (x *ListUserURLsResponse) Reset()
- func (x *ListUserURLsResponse) SetUrls(v []*URLPair)
- func (x *ListUserURLsResponse) String() string
- type ListUserURLsResponse_builder
- type PingRequest
- type PingRequest_builder
- type PingResponse
- func (x *PingResponse) ClearStatus()
- func (x *PingResponse) GetStatus() string
- func (x *PingResponse) HasStatus() bool
- func (*PingResponse) ProtoMessage()
- func (x *PingResponse) ProtoReflect() protoreflect.Message
- func (x *PingResponse) Reset()
- func (x *PingResponse) SetStatus(v string)
- func (x *PingResponse) String() string
- type PingResponse_builder
- type ShortenBatchRequest
- func (x *ShortenBatchRequest) ClearUserId()
- func (x *ShortenBatchRequest) GetUrls() []*URLPair
- func (x *ShortenBatchRequest) GetUserId() string
- func (x *ShortenBatchRequest) HasUserId() bool
- func (*ShortenBatchRequest) ProtoMessage()
- func (x *ShortenBatchRequest) ProtoReflect() protoreflect.Message
- func (x *ShortenBatchRequest) Reset()
- func (x *ShortenBatchRequest) SetUrls(v []*URLPair)
- func (x *ShortenBatchRequest) SetUserId(v string)
- func (x *ShortenBatchRequest) String() string
- type ShortenBatchRequest_builder
- type ShortenBatchResponse
- func (x *ShortenBatchResponse) GetResults() []*URLPair
- func (*ShortenBatchResponse) ProtoMessage()
- func (x *ShortenBatchResponse) ProtoReflect() protoreflect.Message
- func (x *ShortenBatchResponse) Reset()
- func (x *ShortenBatchResponse) SetResults(v []*URLPair)
- func (x *ShortenBatchResponse) String() string
- type ShortenBatchResponse_builder
- type ShortenRequest
- func (x *ShortenRequest) ClearOriginalUrl()
- func (x *ShortenRequest) ClearUserId()
- func (x *ShortenRequest) GetOriginalUrl() string
- func (x *ShortenRequest) GetUserId() string
- func (x *ShortenRequest) HasOriginalUrl() bool
- func (x *ShortenRequest) HasUserId() bool
- func (*ShortenRequest) ProtoMessage()
- func (x *ShortenRequest) ProtoReflect() protoreflect.Message
- func (x *ShortenRequest) Reset()
- func (x *ShortenRequest) SetOriginalUrl(v string)
- func (x *ShortenRequest) SetUserId(v string)
- func (x *ShortenRequest) String() string
- type ShortenRequest_builder
- type ShortenResponse
- func (x *ShortenResponse) ClearShortUrl()
- func (x *ShortenResponse) GetShortUrl() string
- func (x *ShortenResponse) HasShortUrl() bool
- func (*ShortenResponse) ProtoMessage()
- func (x *ShortenResponse) ProtoReflect() protoreflect.Message
- func (x *ShortenResponse) Reset()
- func (x *ShortenResponse) SetShortUrl(v string)
- func (x *ShortenResponse) String() string
- type ShortenResponse_builder
- type StatsRequest
- func (x *StatsRequest) ClearIp()
- func (x *StatsRequest) GetIp() string
- func (x *StatsRequest) HasIp() bool
- func (*StatsRequest) ProtoMessage()
- func (x *StatsRequest) ProtoReflect() protoreflect.Message
- func (x *StatsRequest) Reset()
- func (x *StatsRequest) SetIp(v string)
- func (x *StatsRequest) String() string
- type StatsRequest_builder
- type StatsResponse
- func (x *StatsResponse) ClearUrlCount()
- func (x *StatsResponse) ClearUserCount()
- func (x *StatsResponse) GetUrlCount() int64
- func (x *StatsResponse) GetUserCount() int64
- func (x *StatsResponse) HasUrlCount() bool
- func (x *StatsResponse) HasUserCount() bool
- func (*StatsResponse) ProtoMessage()
- func (x *StatsResponse) ProtoReflect() protoreflect.Message
- func (x *StatsResponse) Reset()
- func (x *StatsResponse) SetUrlCount(v int64)
- func (x *StatsResponse) SetUserCount(v int64)
- func (x *StatsResponse) String() string
- type StatsResponse_builder
- type URLPair
- func (x *URLPair) ClearCorrelationId()
- func (x *URLPair) ClearOriginalUrl()
- func (x *URLPair) ClearShortUrl()
- func (x *URLPair) GetCorrelationId() string
- func (x *URLPair) GetOriginalUrl() string
- func (x *URLPair) GetShortUrl() string
- func (x *URLPair) HasCorrelationId() bool
- func (x *URLPair) HasOriginalUrl() bool
- func (x *URLPair) HasShortUrl() bool
- func (*URLPair) ProtoMessage()
- func (x *URLPair) ProtoReflect() protoreflect.Message
- func (x *URLPair) Reset()
- func (x *URLPair) SetCorrelationId(v string)
- func (x *URLPair) SetOriginalUrl(v string)
- func (x *URLPair) SetShortUrl(v string)
- func (x *URLPair) String() string
- type URLPair_builder
- type URLShortenerClient
- type URLShortenerServer
- type UnimplementedURLShortenerServer
- func (UnimplementedURLShortenerServer) DeleteUserURLs(context.Context, *DeleteUserURLsRequest) (*DeleteUserURLsResponse, error)
- func (UnimplementedURLShortenerServer) Expand(context.Context, *ExpandRequest) (*ExpandResponse, error)
- func (UnimplementedURLShortenerServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
- func (UnimplementedURLShortenerServer) ListUserURLs(context.Context, *ListUserURLsRequest) (*ListUserURLsResponse, error)
- func (UnimplementedURLShortenerServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
- func (UnimplementedURLShortenerServer) Shorten(context.Context, *ShortenRequest) (*ShortenResponse, error)
- func (UnimplementedURLShortenerServer) ShortenBatch(context.Context, *ShortenBatchRequest) (*ShortenBatchResponse, error)
- func (UnimplementedURLShortenerServer) ShortenJSON(context.Context, *ShortenRequest) (*ShortenResponse, error)
- func (UnimplementedURLShortenerServer) Stats(context.Context, *StatsRequest) (*StatsResponse, error)
- type UnsafeURLShortenerServer
Constants ¶
const ( URLShortener_Shorten_FullMethodName = "/shortugo.URLShortener/Shorten" URLShortener_ShortenJSON_FullMethodName = "/shortugo.URLShortener/ShortenJSON" URLShortener_ShortenBatch_FullMethodName = "/shortugo.URLShortener/ShortenBatch" URLShortener_Expand_FullMethodName = "/shortugo.URLShortener/Expand" URLShortener_ListUserURLs_FullMethodName = "/shortugo.URLShortener/ListUserURLs" URLShortener_DeleteUserURLs_FullMethodName = "/shortugo.URLShortener/DeleteUserURLs" URLShortener_HealthCheck_FullMethodName = "/shortugo.URLShortener/HealthCheck" URLShortener_Ping_FullMethodName = "/shortugo.URLShortener/Ping" URLShortener_Stats_FullMethodName = "/shortugo.URLShortener/Stats" )
Variables ¶
var File_proto_shortugo_proto protoreflect.FileDescriptor
var URLShortener_ServiceDesc = grpc.ServiceDesc{ ServiceName: "shortugo.URLShortener", HandlerType: (*URLShortenerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Shorten", Handler: _URLShortener_Shorten_Handler, }, { MethodName: "ShortenJSON", Handler: _URLShortener_ShortenJSON_Handler, }, { MethodName: "ShortenBatch", Handler: _URLShortener_ShortenBatch_Handler, }, { MethodName: "Expand", Handler: _URLShortener_Expand_Handler, }, { MethodName: "ListUserURLs", Handler: _URLShortener_ListUserURLs_Handler, }, { MethodName: "DeleteUserURLs", Handler: _URLShortener_DeleteUserURLs_Handler, }, { MethodName: "HealthCheck", Handler: _URLShortener_HealthCheck_Handler, }, { MethodName: "Ping", Handler: _URLShortener_Ping_Handler, }, { MethodName: "Stats", Handler: _URLShortener_Stats_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/shortugo.proto", }
URLShortener_ServiceDesc is the grpc.ServiceDesc for URLShortener service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterURLShortenerServer ¶
func RegisterURLShortenerServer(s grpc.ServiceRegistrar, srv URLShortenerServer)
Types ¶
type DeleteUserURLsRequest ¶
type DeleteUserURLsRequest struct {
UserId *string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
ShortUrlIds []string `protobuf:"bytes,2,rep,name=short_url_ids,json=shortUrlIds" json:"short_url_ids,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteUserURLsRequest) ClearUserId ¶
func (x *DeleteUserURLsRequest) ClearUserId()
func (*DeleteUserURLsRequest) GetShortUrlIds ¶
func (x *DeleteUserURLsRequest) GetShortUrlIds() []string
func (*DeleteUserURLsRequest) GetUserId ¶
func (x *DeleteUserURLsRequest) GetUserId() string
func (*DeleteUserURLsRequest) HasUserId ¶
func (x *DeleteUserURLsRequest) HasUserId() bool
func (*DeleteUserURLsRequest) ProtoMessage ¶
func (*DeleteUserURLsRequest) ProtoMessage()
func (*DeleteUserURLsRequest) ProtoReflect ¶
func (x *DeleteUserURLsRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserURLsRequest) Reset ¶
func (x *DeleteUserURLsRequest) Reset()
func (*DeleteUserURLsRequest) SetShortUrlIds ¶
func (x *DeleteUserURLsRequest) SetShortUrlIds(v []string)
func (*DeleteUserURLsRequest) SetUserId ¶
func (x *DeleteUserURLsRequest) SetUserId(v string)
func (*DeleteUserURLsRequest) String ¶
func (x *DeleteUserURLsRequest) String() string
type DeleteUserURLsRequest_builder ¶
type DeleteUserURLsRequest_builder struct {
UserId *string
ShortUrlIds []string
// contains filtered or unexported fields
}
func (DeleteUserURLsRequest_builder) Build ¶
func (b0 DeleteUserURLsRequest_builder) Build() *DeleteUserURLsRequest
type DeleteUserURLsResponse ¶
type DeleteUserURLsResponse struct {
Success *bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteUserURLsResponse) ClearSuccess ¶
func (x *DeleteUserURLsResponse) ClearSuccess()
func (*DeleteUserURLsResponse) GetSuccess ¶
func (x *DeleteUserURLsResponse) GetSuccess() bool
func (*DeleteUserURLsResponse) HasSuccess ¶
func (x *DeleteUserURLsResponse) HasSuccess() bool
func (*DeleteUserURLsResponse) ProtoMessage ¶
func (*DeleteUserURLsResponse) ProtoMessage()
func (*DeleteUserURLsResponse) ProtoReflect ¶
func (x *DeleteUserURLsResponse) ProtoReflect() protoreflect.Message
func (*DeleteUserURLsResponse) Reset ¶
func (x *DeleteUserURLsResponse) Reset()
func (*DeleteUserURLsResponse) SetSuccess ¶
func (x *DeleteUserURLsResponse) SetSuccess(v bool)
func (*DeleteUserURLsResponse) String ¶
func (x *DeleteUserURLsResponse) String() string
type DeleteUserURLsResponse_builder ¶
type DeleteUserURLsResponse_builder struct {
Success *bool
// contains filtered or unexported fields
}
func (DeleteUserURLsResponse_builder) Build ¶
func (b0 DeleteUserURLsResponse_builder) Build() *DeleteUserURLsResponse
type ExpandRequest ¶
type ExpandRequest struct {
ShortUrlId *string `protobuf:"bytes,1,opt,name=short_url_id,json=shortUrlId" json:"short_url_id,omitempty"`
// contains filtered or unexported fields
}
func (*ExpandRequest) ClearShortUrlId ¶
func (x *ExpandRequest) ClearShortUrlId()
func (*ExpandRequest) GetShortUrlId ¶
func (x *ExpandRequest) GetShortUrlId() string
func (*ExpandRequest) HasShortUrlId ¶
func (x *ExpandRequest) HasShortUrlId() bool
func (*ExpandRequest) ProtoMessage ¶
func (*ExpandRequest) ProtoMessage()
func (*ExpandRequest) ProtoReflect ¶
func (x *ExpandRequest) ProtoReflect() protoreflect.Message
func (*ExpandRequest) Reset ¶
func (x *ExpandRequest) Reset()
func (*ExpandRequest) SetShortUrlId ¶
func (x *ExpandRequest) SetShortUrlId(v string)
func (*ExpandRequest) String ¶
func (x *ExpandRequest) String() string
type ExpandRequest_builder ¶
type ExpandRequest_builder struct {
ShortUrlId *string
// contains filtered or unexported fields
}
func (ExpandRequest_builder) Build ¶
func (b0 ExpandRequest_builder) Build() *ExpandRequest
type ExpandResponse ¶
type ExpandResponse struct {
OriginalUrl *string `protobuf:"bytes,1,opt,name=original_url,json=originalUrl" json:"original_url,omitempty"`
// contains filtered or unexported fields
}
func (*ExpandResponse) ClearOriginalUrl ¶
func (x *ExpandResponse) ClearOriginalUrl()
func (*ExpandResponse) GetOriginalUrl ¶
func (x *ExpandResponse) GetOriginalUrl() string
func (*ExpandResponse) HasOriginalUrl ¶
func (x *ExpandResponse) HasOriginalUrl() bool
func (*ExpandResponse) ProtoMessage ¶
func (*ExpandResponse) ProtoMessage()
func (*ExpandResponse) ProtoReflect ¶
func (x *ExpandResponse) ProtoReflect() protoreflect.Message
func (*ExpandResponse) Reset ¶
func (x *ExpandResponse) Reset()
func (*ExpandResponse) SetOriginalUrl ¶
func (x *ExpandResponse) SetOriginalUrl(v string)
func (*ExpandResponse) String ¶
func (x *ExpandResponse) String() string
type ExpandResponse_builder ¶
type ExpandResponse_builder struct {
OriginalUrl *string
// contains filtered or unexported fields
}
func (ExpandResponse_builder) Build ¶
func (b0 ExpandResponse_builder) Build() *ExpandResponse
type HealthCheckRequest ¶
type HealthCheckRequest struct {
// contains filtered or unexported fields
}
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) ProtoReflect ¶
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
func (*HealthCheckRequest) Reset ¶
func (x *HealthCheckRequest) Reset()
func (*HealthCheckRequest) String ¶
func (x *HealthCheckRequest) String() string
type HealthCheckRequest_builder ¶
type HealthCheckRequest_builder struct {
// contains filtered or unexported fields
}
func (HealthCheckRequest_builder) Build ¶
func (b0 HealthCheckRequest_builder) Build() *HealthCheckRequest
type HealthCheckResponse ¶
type HealthCheckResponse struct {
Status *string `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*HealthCheckResponse) ClearStatus ¶
func (x *HealthCheckResponse) ClearStatus()
func (*HealthCheckResponse) GetStatus ¶
func (x *HealthCheckResponse) GetStatus() string
func (*HealthCheckResponse) HasStatus ¶
func (x *HealthCheckResponse) HasStatus() bool
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) ProtoReflect ¶
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
func (*HealthCheckResponse) Reset ¶
func (x *HealthCheckResponse) Reset()
func (*HealthCheckResponse) SetStatus ¶
func (x *HealthCheckResponse) SetStatus(v string)
func (*HealthCheckResponse) String ¶
func (x *HealthCheckResponse) String() string
type HealthCheckResponse_builder ¶
type HealthCheckResponse_builder struct {
Status *string
// contains filtered or unexported fields
}
func (HealthCheckResponse_builder) Build ¶
func (b0 HealthCheckResponse_builder) Build() *HealthCheckResponse
type ListUserURLsRequest ¶
type ListUserURLsRequest struct {
UserId *string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*ListUserURLsRequest) ClearUserId ¶
func (x *ListUserURLsRequest) ClearUserId()
func (*ListUserURLsRequest) GetUserId ¶
func (x *ListUserURLsRequest) GetUserId() string
func (*ListUserURLsRequest) HasUserId ¶
func (x *ListUserURLsRequest) HasUserId() bool
func (*ListUserURLsRequest) ProtoMessage ¶
func (*ListUserURLsRequest) ProtoMessage()
func (*ListUserURLsRequest) ProtoReflect ¶
func (x *ListUserURLsRequest) ProtoReflect() protoreflect.Message
func (*ListUserURLsRequest) Reset ¶
func (x *ListUserURLsRequest) Reset()
func (*ListUserURLsRequest) SetUserId ¶
func (x *ListUserURLsRequest) SetUserId(v string)
func (*ListUserURLsRequest) String ¶
func (x *ListUserURLsRequest) String() string
type ListUserURLsRequest_builder ¶
type ListUserURLsRequest_builder struct {
UserId *string
// contains filtered or unexported fields
}
func (ListUserURLsRequest_builder) Build ¶
func (b0 ListUserURLsRequest_builder) Build() *ListUserURLsRequest
type ListUserURLsResponse ¶
type ListUserURLsResponse struct {
Urls []*URLPair `protobuf:"bytes,1,rep,name=urls" json:"urls,omitempty"`
// contains filtered or unexported fields
}
func (*ListUserURLsResponse) GetUrls ¶
func (x *ListUserURLsResponse) GetUrls() []*URLPair
func (*ListUserURLsResponse) ProtoMessage ¶
func (*ListUserURLsResponse) ProtoMessage()
func (*ListUserURLsResponse) ProtoReflect ¶
func (x *ListUserURLsResponse) ProtoReflect() protoreflect.Message
func (*ListUserURLsResponse) Reset ¶
func (x *ListUserURLsResponse) Reset()
func (*ListUserURLsResponse) SetUrls ¶
func (x *ListUserURLsResponse) SetUrls(v []*URLPair)
func (*ListUserURLsResponse) String ¶
func (x *ListUserURLsResponse) String() string
type ListUserURLsResponse_builder ¶
type ListUserURLsResponse_builder struct {
Urls []*URLPair
// contains filtered or unexported fields
}
func (ListUserURLsResponse_builder) Build ¶
func (b0 ListUserURLsResponse_builder) Build() *ListUserURLsResponse
type PingRequest ¶
type PingRequest struct {
// contains filtered or unexported fields
}
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingRequest_builder ¶
type PingRequest_builder struct {
// contains filtered or unexported fields
}
func (PingRequest_builder) Build ¶
func (b0 PingRequest_builder) Build() *PingRequest
type PingResponse ¶
type PingResponse struct {
Status *string `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*PingResponse) ClearStatus ¶
func (x *PingResponse) ClearStatus()
func (*PingResponse) GetStatus ¶
func (x *PingResponse) GetStatus() string
func (*PingResponse) HasStatus ¶
func (x *PingResponse) HasStatus() bool
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) SetStatus ¶
func (x *PingResponse) SetStatus(v string)
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type PingResponse_builder ¶
type PingResponse_builder struct {
Status *string
// contains filtered or unexported fields
}
func (PingResponse_builder) Build ¶
func (b0 PingResponse_builder) Build() *PingResponse
type ShortenBatchRequest ¶
type ShortenBatchRequest struct {
UserId *string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
Urls []*URLPair `protobuf:"bytes,2,rep,name=urls" json:"urls,omitempty"`
// contains filtered or unexported fields
}
func (*ShortenBatchRequest) ClearUserId ¶
func (x *ShortenBatchRequest) ClearUserId()
func (*ShortenBatchRequest) GetUrls ¶
func (x *ShortenBatchRequest) GetUrls() []*URLPair
func (*ShortenBatchRequest) GetUserId ¶
func (x *ShortenBatchRequest) GetUserId() string
func (*ShortenBatchRequest) HasUserId ¶
func (x *ShortenBatchRequest) HasUserId() bool
func (*ShortenBatchRequest) ProtoMessage ¶
func (*ShortenBatchRequest) ProtoMessage()
func (*ShortenBatchRequest) ProtoReflect ¶
func (x *ShortenBatchRequest) ProtoReflect() protoreflect.Message
func (*ShortenBatchRequest) Reset ¶
func (x *ShortenBatchRequest) Reset()
func (*ShortenBatchRequest) SetUrls ¶
func (x *ShortenBatchRequest) SetUrls(v []*URLPair)
func (*ShortenBatchRequest) SetUserId ¶
func (x *ShortenBatchRequest) SetUserId(v string)
func (*ShortenBatchRequest) String ¶
func (x *ShortenBatchRequest) String() string
type ShortenBatchRequest_builder ¶
type ShortenBatchRequest_builder struct {
UserId *string
Urls []*URLPair
// contains filtered or unexported fields
}
func (ShortenBatchRequest_builder) Build ¶
func (b0 ShortenBatchRequest_builder) Build() *ShortenBatchRequest
type ShortenBatchResponse ¶
type ShortenBatchResponse struct {
Results []*URLPair `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
// contains filtered or unexported fields
}
func (*ShortenBatchResponse) GetResults ¶
func (x *ShortenBatchResponse) GetResults() []*URLPair
func (*ShortenBatchResponse) ProtoMessage ¶
func (*ShortenBatchResponse) ProtoMessage()
func (*ShortenBatchResponse) ProtoReflect ¶
func (x *ShortenBatchResponse) ProtoReflect() protoreflect.Message
func (*ShortenBatchResponse) Reset ¶
func (x *ShortenBatchResponse) Reset()
func (*ShortenBatchResponse) SetResults ¶
func (x *ShortenBatchResponse) SetResults(v []*URLPair)
func (*ShortenBatchResponse) String ¶
func (x *ShortenBatchResponse) String() string
type ShortenBatchResponse_builder ¶
type ShortenBatchResponse_builder struct {
Results []*URLPair
// contains filtered or unexported fields
}
func (ShortenBatchResponse_builder) Build ¶
func (b0 ShortenBatchResponse_builder) Build() *ShortenBatchResponse
type ShortenRequest ¶
type ShortenRequest struct {
OriginalUrl *string `protobuf:"bytes,1,opt,name=original_url,json=originalUrl" json:"original_url,omitempty"`
UserId *string `protobuf:"bytes,2,opt,name=user_id,json=userId" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*ShortenRequest) ClearOriginalUrl ¶
func (x *ShortenRequest) ClearOriginalUrl()
func (*ShortenRequest) ClearUserId ¶
func (x *ShortenRequest) ClearUserId()
func (*ShortenRequest) GetOriginalUrl ¶
func (x *ShortenRequest) GetOriginalUrl() string
func (*ShortenRequest) GetUserId ¶
func (x *ShortenRequest) GetUserId() string
func (*ShortenRequest) HasOriginalUrl ¶
func (x *ShortenRequest) HasOriginalUrl() bool
func (*ShortenRequest) HasUserId ¶
func (x *ShortenRequest) HasUserId() bool
func (*ShortenRequest) ProtoMessage ¶
func (*ShortenRequest) ProtoMessage()
func (*ShortenRequest) ProtoReflect ¶
func (x *ShortenRequest) ProtoReflect() protoreflect.Message
func (*ShortenRequest) Reset ¶
func (x *ShortenRequest) Reset()
func (*ShortenRequest) SetOriginalUrl ¶
func (x *ShortenRequest) SetOriginalUrl(v string)
func (*ShortenRequest) SetUserId ¶
func (x *ShortenRequest) SetUserId(v string)
func (*ShortenRequest) String ¶
func (x *ShortenRequest) String() string
type ShortenRequest_builder ¶
type ShortenRequest_builder struct {
OriginalUrl *string
UserId *string
// contains filtered or unexported fields
}
func (ShortenRequest_builder) Build ¶
func (b0 ShortenRequest_builder) Build() *ShortenRequest
type ShortenResponse ¶
type ShortenResponse struct {
ShortUrl *string `protobuf:"bytes,1,opt,name=short_url,json=shortUrl" json:"short_url,omitempty"`
// contains filtered or unexported fields
}
func (*ShortenResponse) ClearShortUrl ¶
func (x *ShortenResponse) ClearShortUrl()
func (*ShortenResponse) GetShortUrl ¶
func (x *ShortenResponse) GetShortUrl() string
func (*ShortenResponse) HasShortUrl ¶
func (x *ShortenResponse) HasShortUrl() bool
func (*ShortenResponse) ProtoMessage ¶
func (*ShortenResponse) ProtoMessage()
func (*ShortenResponse) ProtoReflect ¶
func (x *ShortenResponse) ProtoReflect() protoreflect.Message
func (*ShortenResponse) Reset ¶
func (x *ShortenResponse) Reset()
func (*ShortenResponse) SetShortUrl ¶
func (x *ShortenResponse) SetShortUrl(v string)
func (*ShortenResponse) String ¶
func (x *ShortenResponse) String() string
type ShortenResponse_builder ¶
type ShortenResponse_builder struct {
ShortUrl *string
// contains filtered or unexported fields
}
func (ShortenResponse_builder) Build ¶
func (b0 ShortenResponse_builder) Build() *ShortenResponse
type StatsRequest ¶
type StatsRequest struct {
Ip *string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"` // IP address of the client, used for trusted subnet validation
// contains filtered or unexported fields
}
func (*StatsRequest) ClearIp ¶
func (x *StatsRequest) ClearIp()
func (*StatsRequest) GetIp ¶
func (x *StatsRequest) GetIp() string
func (*StatsRequest) HasIp ¶
func (x *StatsRequest) HasIp() bool
func (*StatsRequest) ProtoMessage ¶
func (*StatsRequest) ProtoMessage()
func (*StatsRequest) ProtoReflect ¶
func (x *StatsRequest) ProtoReflect() protoreflect.Message
func (*StatsRequest) Reset ¶
func (x *StatsRequest) Reset()
func (*StatsRequest) SetIp ¶
func (x *StatsRequest) SetIp(v string)
func (*StatsRequest) String ¶
func (x *StatsRequest) String() string
type StatsRequest_builder ¶
type StatsRequest_builder struct {
Ip *string
// contains filtered or unexported fields
}
func (StatsRequest_builder) Build ¶
func (b0 StatsRequest_builder) Build() *StatsRequest
type StatsResponse ¶
type StatsResponse struct {
UrlCount *int64 `protobuf:"varint,1,opt,name=url_count,json=urlCount" json:"url_count,omitempty"`
UserCount *int64 `protobuf:"varint,2,opt,name=user_count,json=userCount" json:"user_count,omitempty"`
// contains filtered or unexported fields
}
func (*StatsResponse) ClearUrlCount ¶
func (x *StatsResponse) ClearUrlCount()
func (*StatsResponse) ClearUserCount ¶
func (x *StatsResponse) ClearUserCount()
func (*StatsResponse) GetUrlCount ¶
func (x *StatsResponse) GetUrlCount() int64
func (*StatsResponse) GetUserCount ¶
func (x *StatsResponse) GetUserCount() int64
func (*StatsResponse) HasUrlCount ¶
func (x *StatsResponse) HasUrlCount() bool
func (*StatsResponse) HasUserCount ¶
func (x *StatsResponse) HasUserCount() bool
func (*StatsResponse) ProtoMessage ¶
func (*StatsResponse) ProtoMessage()
func (*StatsResponse) ProtoReflect ¶
func (x *StatsResponse) ProtoReflect() protoreflect.Message
func (*StatsResponse) Reset ¶
func (x *StatsResponse) Reset()
func (*StatsResponse) SetUrlCount ¶
func (x *StatsResponse) SetUrlCount(v int64)
func (*StatsResponse) SetUserCount ¶
func (x *StatsResponse) SetUserCount(v int64)
func (*StatsResponse) String ¶
func (x *StatsResponse) String() string
type StatsResponse_builder ¶
type StatsResponse_builder struct {
UrlCount *int64
UserCount *int64
// contains filtered or unexported fields
}
func (StatsResponse_builder) Build ¶
func (b0 StatsResponse_builder) Build() *StatsResponse
type URLPair ¶
type URLPair struct {
CorrelationId *string `protobuf:"bytes,1,opt,name=correlation_id,json=correlationId" json:"correlation_id,omitempty"`
OriginalUrl *string `protobuf:"bytes,2,opt,name=original_url,json=originalUrl" json:"original_url,omitempty"`
ShortUrl *string `protobuf:"bytes,3,opt,name=short_url,json=shortUrl" json:"short_url,omitempty"`
// contains filtered or unexported fields
}
func (*URLPair) ClearCorrelationId ¶
func (x *URLPair) ClearCorrelationId()
func (*URLPair) ClearOriginalUrl ¶
func (x *URLPair) ClearOriginalUrl()
func (*URLPair) ClearShortUrl ¶
func (x *URLPair) ClearShortUrl()
func (*URLPair) GetCorrelationId ¶
func (*URLPair) GetOriginalUrl ¶
func (*URLPair) GetShortUrl ¶
func (*URLPair) HasCorrelationId ¶
func (*URLPair) HasOriginalUrl ¶
func (*URLPair) HasShortUrl ¶
func (*URLPair) ProtoMessage ¶
func (*URLPair) ProtoMessage()
func (*URLPair) ProtoReflect ¶
func (x *URLPair) ProtoReflect() protoreflect.Message
func (*URLPair) SetCorrelationId ¶
func (*URLPair) SetOriginalUrl ¶
func (*URLPair) SetShortUrl ¶
type URLPair_builder ¶
type URLPair_builder struct {
CorrelationId *string
OriginalUrl *string
ShortUrl *string
// contains filtered or unexported fields
}
func (URLPair_builder) Build ¶
func (b0 URLPair_builder) Build() *URLPair
type URLShortenerClient ¶
type URLShortenerClient interface {
Shorten(ctx context.Context, in *ShortenRequest, opts ...grpc.CallOption) (*ShortenResponse, error)
ShortenJSON(ctx context.Context, in *ShortenRequest, opts ...grpc.CallOption) (*ShortenResponse, error)
ShortenBatch(ctx context.Context, in *ShortenBatchRequest, opts ...grpc.CallOption) (*ShortenBatchResponse, error)
Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (*ExpandResponse, error)
ListUserURLs(ctx context.Context, in *ListUserURLsRequest, opts ...grpc.CallOption) (*ListUserURLsResponse, error)
DeleteUserURLs(ctx context.Context, in *DeleteUserURLsRequest, opts ...grpc.CallOption) (*DeleteUserURLsResponse, error)
HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error)
}
URLShortenerClient is the client API for URLShortener 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 NewURLShortenerClient ¶
func NewURLShortenerClient(cc grpc.ClientConnInterface) URLShortenerClient
type URLShortenerServer ¶
type URLShortenerServer interface {
Shorten(context.Context, *ShortenRequest) (*ShortenResponse, error)
ShortenJSON(context.Context, *ShortenRequest) (*ShortenResponse, error)
ShortenBatch(context.Context, *ShortenBatchRequest) (*ShortenBatchResponse, error)
Expand(context.Context, *ExpandRequest) (*ExpandResponse, error)
ListUserURLs(context.Context, *ListUserURLsRequest) (*ListUserURLsResponse, error)
DeleteUserURLs(context.Context, *DeleteUserURLsRequest) (*DeleteUserURLsResponse, error)
HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
Ping(context.Context, *PingRequest) (*PingResponse, error)
Stats(context.Context, *StatsRequest) (*StatsResponse, error)
// contains filtered or unexported methods
}
URLShortenerServer is the server API for URLShortener service. All implementations must embed UnimplementedURLShortenerServer for forward compatibility.
type UnimplementedURLShortenerServer ¶
type UnimplementedURLShortenerServer struct{}
UnimplementedURLShortenerServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedURLShortenerServer) DeleteUserURLs ¶
func (UnimplementedURLShortenerServer) DeleteUserURLs(context.Context, *DeleteUserURLsRequest) (*DeleteUserURLsResponse, error)
func (UnimplementedURLShortenerServer) Expand ¶
func (UnimplementedURLShortenerServer) Expand(context.Context, *ExpandRequest) (*ExpandResponse, error)
func (UnimplementedURLShortenerServer) HealthCheck ¶
func (UnimplementedURLShortenerServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
func (UnimplementedURLShortenerServer) ListUserURLs ¶
func (UnimplementedURLShortenerServer) ListUserURLs(context.Context, *ListUserURLsRequest) (*ListUserURLsResponse, error)
func (UnimplementedURLShortenerServer) Ping ¶
func (UnimplementedURLShortenerServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
func (UnimplementedURLShortenerServer) Shorten ¶
func (UnimplementedURLShortenerServer) Shorten(context.Context, *ShortenRequest) (*ShortenResponse, error)
func (UnimplementedURLShortenerServer) ShortenBatch ¶
func (UnimplementedURLShortenerServer) ShortenBatch(context.Context, *ShortenBatchRequest) (*ShortenBatchResponse, error)
func (UnimplementedURLShortenerServer) ShortenJSON ¶
func (UnimplementedURLShortenerServer) ShortenJSON(context.Context, *ShortenRequest) (*ShortenResponse, error)
func (UnimplementedURLShortenerServer) Stats ¶
func (UnimplementedURLShortenerServer) Stats(context.Context, *StatsRequest) (*StatsResponse, error)
type UnsafeURLShortenerServer ¶
type UnsafeURLShortenerServer interface {
// contains filtered or unexported methods
}
UnsafeURLShortenerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to URLShortenerServer will result in compilation errors.