clicks

package
v0.0.0-...-39d4010 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package clicks is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	SaveClicks_CreateUrlClick_FullMethodName = "/SaveClicks/CreateUrlClick"
)

Variables

View Source
var File_clicks_clicks_proto protoreflect.FileDescriptor
View Source
var SaveClicks_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "SaveClicks",
	HandlerType: (*SaveClicksServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUrlClick",
			Handler:    _SaveClicks_CreateUrlClick_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "clicks/clicks.proto",
}

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

Functions

func RegisterSaveClicksHandler

func RegisterSaveClicksHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSaveClicksHandler registers the http handlers for service SaveClicks to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSaveClicksHandlerClient

func RegisterSaveClicksHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SaveClicksClient) error

RegisterSaveClicksHandlerClient registers the http handlers for service SaveClicks to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SaveClicksClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SaveClicksClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SaveClicksClient" to call the correct interceptors.

func RegisterSaveClicksHandlerFromEndpoint

func RegisterSaveClicksHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSaveClicksHandlerFromEndpoint is same as RegisterSaveClicksHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSaveClicksHandlerServer

func RegisterSaveClicksHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SaveClicksServer) error

RegisterSaveClicksHandlerServer registers the http handlers for service SaveClicks to "mux". UnaryRPC :call SaveClicksServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSaveClicksHandlerFromEndpoint instead.

func RegisterSaveClicksServer

func RegisterSaveClicksServer(s grpc.ServiceRegistrar, srv SaveClicksServer)

Types

type Click

type Click struct {
	UrlID      string  `protobuf:"bytes,1,opt,name=urlID,proto3" json:"urlID,omitempty"`
	UserAgent  string  `protobuf:"bytes,2,opt,name=userAgent,proto3" json:"userAgent,omitempty"`
	IpAddress  string  `protobuf:"bytes,3,opt,name=ipAddress,proto3" json:"ipAddress,omitempty"`
	Referrer   string  `protobuf:"bytes,4,opt,name=referrer,proto3" json:"referrer,omitempty"`
	DeviceType string  `protobuf:"bytes,5,opt,name=deviceType,proto3" json:"deviceType,omitempty"`
	Browser    string  `protobuf:"bytes,6,opt,name=browser,proto3" json:"browser,omitempty"`
	Os         string  `protobuf:"bytes,7,opt,name=os,proto3" json:"os,omitempty"`
	Country    string  `protobuf:"bytes,8,opt,name=country,proto3" json:"country,omitempty"`
	City       string  `protobuf:"bytes,9,opt,name=city,proto3" json:"city,omitempty"`
	Latitude   float32 `protobuf:"fixed32,10,opt,name=latitude,proto3" json:"latitude,omitempty"`
	Longitude  float32 `protobuf:"fixed32,11,opt,name=longitude,proto3" json:"longitude,omitempty"`
	// contains filtered or unexported fields
}

func (*Click) Descriptor deprecated

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

Deprecated: Use Click.ProtoReflect.Descriptor instead.

func (*Click) GetBrowser

func (x *Click) GetBrowser() string

func (*Click) GetCity

func (x *Click) GetCity() string

func (*Click) GetCountry

func (x *Click) GetCountry() string

func (*Click) GetDeviceType

func (x *Click) GetDeviceType() string

func (*Click) GetIpAddress

func (x *Click) GetIpAddress() string

func (*Click) GetLatitude

func (x *Click) GetLatitude() float32

func (*Click) GetLongitude

func (x *Click) GetLongitude() float32

func (*Click) GetOs

func (x *Click) GetOs() string

func (*Click) GetReferrer

func (x *Click) GetReferrer() string

func (*Click) GetUrlID

func (x *Click) GetUrlID() string

func (*Click) GetUserAgent

func (x *Click) GetUserAgent() string

func (*Click) ProtoMessage

func (*Click) ProtoMessage()

func (*Click) ProtoReflect

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

func (*Click) Reset

func (x *Click) Reset()

func (*Click) String

func (x *Click) String() string

type Clicks

type Clicks struct {
	Clicks []*Click `protobuf:"bytes,1,rep,name=clicks,proto3" json:"clicks,omitempty"`
	// contains filtered or unexported fields
}

func (*Clicks) Descriptor deprecated

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

Deprecated: Use Clicks.ProtoReflect.Descriptor instead.

func (*Clicks) GetClicks

func (x *Clicks) GetClicks() []*Click

func (*Clicks) ProtoMessage

func (*Clicks) ProtoMessage()

func (*Clicks) ProtoReflect

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

func (*Clicks) Reset

func (x *Clicks) Reset()

func (*Clicks) String

func (x *Clicks) String() string

type SaveClicksClient

type SaveClicksClient interface {
	CreateUrlClick(ctx context.Context, in *UrlClickRequest, opts ...grpc.CallOption) (*UrlClickResponse, error)
}

SaveClicksClient is the client API for SaveClicks 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 NewSaveClicksClient

func NewSaveClicksClient(cc grpc.ClientConnInterface) SaveClicksClient

type SaveClicksServer

type SaveClicksServer interface {
	CreateUrlClick(context.Context, *UrlClickRequest) (*UrlClickResponse, error)
	// contains filtered or unexported methods
}

SaveClicksServer is the server API for SaveClicks service. All implementations must embed UnimplementedSaveClicksServer for forward compatibility

type UnimplementedSaveClicksServer

type UnimplementedSaveClicksServer struct {
}

UnimplementedSaveClicksServer must be embedded to have forward compatible implementations.

func (UnimplementedSaveClicksServer) CreateUrlClick

type UnsafeSaveClicksServer

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

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

type UrlClickRequest

type UrlClickRequest struct {
	UrlID      string  `protobuf:"bytes,1,opt,name=urlID,proto3" json:"urlID,omitempty"`
	UserAgent  string  `protobuf:"bytes,2,opt,name=userAgent,proto3" json:"userAgent,omitempty"`
	IpAddress  string  `protobuf:"bytes,3,opt,name=ipAddress,proto3" json:"ipAddress,omitempty"`
	Referrer   string  `protobuf:"bytes,4,opt,name=referrer,proto3" json:"referrer,omitempty"`
	DeviceType string  `protobuf:"bytes,5,opt,name=deviceType,proto3" json:"deviceType,omitempty"`
	Browser    string  `protobuf:"bytes,6,opt,name=browser,proto3" json:"browser,omitempty"`
	Os         string  `protobuf:"bytes,7,opt,name=os,proto3" json:"os,omitempty"`
	Country    string  `protobuf:"bytes,8,opt,name=country,proto3" json:"country,omitempty"`
	City       string  `protobuf:"bytes,9,opt,name=city,proto3" json:"city,omitempty"`
	Latitude   float32 `protobuf:"fixed32,10,opt,name=latitude,proto3" json:"latitude,omitempty"`
	Longitude  float32 `protobuf:"fixed32,11,opt,name=longitude,proto3" json:"longitude,omitempty"`
	ShortUrl   string  `protobuf:"bytes,12,opt,name=shortUrl,proto3" json:"shortUrl,omitempty"`
	// contains filtered or unexported fields
}

func (*UrlClickRequest) Descriptor deprecated

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

Deprecated: Use UrlClickRequest.ProtoReflect.Descriptor instead.

func (*UrlClickRequest) GetBrowser

func (x *UrlClickRequest) GetBrowser() string

func (*UrlClickRequest) GetCity

func (x *UrlClickRequest) GetCity() string

func (*UrlClickRequest) GetCountry

func (x *UrlClickRequest) GetCountry() string

func (*UrlClickRequest) GetDeviceType

func (x *UrlClickRequest) GetDeviceType() string

func (*UrlClickRequest) GetIpAddress

func (x *UrlClickRequest) GetIpAddress() string

func (*UrlClickRequest) GetLatitude

func (x *UrlClickRequest) GetLatitude() float32

func (*UrlClickRequest) GetLongitude

func (x *UrlClickRequest) GetLongitude() float32

func (*UrlClickRequest) GetOs

func (x *UrlClickRequest) GetOs() string

func (*UrlClickRequest) GetReferrer

func (x *UrlClickRequest) GetReferrer() string

func (*UrlClickRequest) GetShortUrl

func (x *UrlClickRequest) GetShortUrl() string

func (*UrlClickRequest) GetUrlID

func (x *UrlClickRequest) GetUrlID() string

func (*UrlClickRequest) GetUserAgent

func (x *UrlClickRequest) GetUserAgent() string

func (*UrlClickRequest) ProtoMessage

func (*UrlClickRequest) ProtoMessage()

func (*UrlClickRequest) ProtoReflect

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

func (*UrlClickRequest) Reset

func (x *UrlClickRequest) Reset()

func (*UrlClickRequest) String

func (x *UrlClickRequest) String() string

type UrlClickResponse

type UrlClickResponse struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ShortUrl    string `protobuf:"bytes,2,opt,name=shortUrl,proto3" json:"shortUrl,omitempty"`
	WebUrl      string `protobuf:"bytes,3,opt,name=webUrl,proto3" json:"webUrl,omitempty"`
	IosUrl      string `protobuf:"bytes,4,opt,name=iosUrl,proto3" json:"iosUrl,omitempty"`
	AndroidUrl  string `protobuf:"bytes,5,opt,name=androidUrl,proto3" json:"androidUrl,omitempty"`
	Password    string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
	ExpiryAt    string `protobuf:"bytes,7,opt,name=expiryAt,proto3" json:"expiryAt,omitempty"`
	CustomAlias string `protobuf:"bytes,8,opt,name=customAlias,proto3" json:"customAlias,omitempty"`
	Type        string `protobuf:"bytes,9,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*UrlClickResponse) Descriptor deprecated

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

Deprecated: Use UrlClickResponse.ProtoReflect.Descriptor instead.

func (*UrlClickResponse) GetAndroidUrl

func (x *UrlClickResponse) GetAndroidUrl() string

func (*UrlClickResponse) GetCustomAlias

func (x *UrlClickResponse) GetCustomAlias() string

func (*UrlClickResponse) GetExpiryAt

func (x *UrlClickResponse) GetExpiryAt() string

func (*UrlClickResponse) GetId

func (x *UrlClickResponse) GetId() string

func (*UrlClickResponse) GetIosUrl

func (x *UrlClickResponse) GetIosUrl() string

func (*UrlClickResponse) GetPassword

func (x *UrlClickResponse) GetPassword() string

func (*UrlClickResponse) GetShortUrl

func (x *UrlClickResponse) GetShortUrl() string

func (*UrlClickResponse) GetType

func (x *UrlClickResponse) GetType() string

func (*UrlClickResponse) GetWebUrl

func (x *UrlClickResponse) GetWebUrl() string

func (*UrlClickResponse) ProtoMessage

func (*UrlClickResponse) ProtoMessage()

func (*UrlClickResponse) ProtoReflect

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

func (*UrlClickResponse) Reset

func (x *UrlClickResponse) Reset()

func (*UrlClickResponse) String

func (x *UrlClickResponse) String() string

Jump to

Keyboard shortcuts

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