gen

package
v0.0.0-...-14d2bb4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Shrls_GetShrl_FullMethodName    = "/shrls.Shrls/GetShrl"
	Shrls_GetShrls_FullMethodName   = "/shrls.Shrls/GetShrls"
	Shrls_ListShrls_FullMethodName  = "/shrls.Shrls/ListShrls"
	Shrls_PutShrl_FullMethodName    = "/shrls.Shrls/PutShrl"
	Shrls_PostShrl_FullMethodName   = "/shrls.Shrls/PostShrl"
	Shrls_DeleteShrl_FullMethodName = "/shrls.Shrls/DeleteShrl"
)
View Source
const (
	FileUpload_PostFileUpload_FullMethodName = "/shrls.FileUpload/PostFileUpload"
)

Variables

View Source
var (
	ShortURL_ShortURLType_name = map[int32]string{
		0: "LINK",
		1: "UPLOAD",
		2: "SNIPPET",
	}
	ShortURL_ShortURLType_value = map[string]int32{
		"LINK":    0,
		"UPLOAD":  1,
		"SNIPPET": 2,
	}
)

Enum value maps for ShortURL_ShortURLType.

View Source
var FileUpload_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shrls.FileUpload",
	HandlerType: (*FileUploadServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PostFileUpload",
			Handler:    _FileUpload_PostFileUpload_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "shrls.proto",
}

FileUpload_ServiceDesc is the grpc.ServiceDesc for FileUpload 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_shrls_proto protoreflect.FileDescriptor
View Source
var Shrls_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shrls.Shrls",
	HandlerType: (*ShrlsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetShrl",
			Handler:    _Shrls_GetShrl_Handler,
		},
		{
			MethodName: "GetShrls",
			Handler:    _Shrls_GetShrls_Handler,
		},
		{
			MethodName: "ListShrls",
			Handler:    _Shrls_ListShrls_Handler,
		},
		{
			MethodName: "PutShrl",
			Handler:    _Shrls_PutShrl_Handler,
		},
		{
			MethodName: "PostShrl",
			Handler:    _Shrls_PostShrl_Handler,
		},
		{
			MethodName: "DeleteShrl",
			Handler:    _Shrls_DeleteShrl_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "shrls.proto",
}

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

Functions

func RegisterFileUploadServer

func RegisterFileUploadServer(s grpc.ServiceRegistrar, srv FileUploadServer)

func RegisterShrlsServer

func RegisterShrlsServer(s grpc.ServiceRegistrar, srv ShrlsServer)

Types

type DeleteShrlRequest

type DeleteShrlRequest struct {
	Shrl *Ref_ShortURL `protobuf:"bytes,1,opt,name=shrl,proto3" json:"shrl,omitempty"`
	// contains filtered or unexported fields
}

Shrls.DeleteShrl

func (*DeleteShrlRequest) Descriptor deprecated

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

Deprecated: Use DeleteShrlRequest.ProtoReflect.Descriptor instead.

func (*DeleteShrlRequest) GetShrl

func (x *DeleteShrlRequest) GetShrl() *Ref_ShortURL

func (*DeleteShrlRequest) ProtoMessage

func (*DeleteShrlRequest) ProtoMessage()

func (*DeleteShrlRequest) ProtoReflect

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

func (*DeleteShrlRequest) Reset

func (x *DeleteShrlRequest) Reset()

func (*DeleteShrlRequest) String

func (x *DeleteShrlRequest) String() string

type DeleteShrlResponse

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

func (*DeleteShrlResponse) Descriptor deprecated

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

Deprecated: Use DeleteShrlResponse.ProtoReflect.Descriptor instead.

func (*DeleteShrlResponse) ProtoMessage

func (*DeleteShrlResponse) ProtoMessage()

func (*DeleteShrlResponse) ProtoReflect

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

func (*DeleteShrlResponse) Reset

func (x *DeleteShrlResponse) Reset()

func (*DeleteShrlResponse) String

func (x *DeleteShrlResponse) String() string

type ExpandedURL

type ExpandedURL struct {

	// Types that are assignable to Content:
	//
	//	*ExpandedURL_Url
	//	*ExpandedURL_File
	//	*ExpandedURL_Snippet
	Content isExpandedURL_Content `protobuf_oneof:"content"`
	// contains filtered or unexported fields
}

func (*ExpandedURL) Descriptor deprecated

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

Deprecated: Use ExpandedURL.ProtoReflect.Descriptor instead.

func (*ExpandedURL) GetContent

func (m *ExpandedURL) GetContent() isExpandedURL_Content

func (*ExpandedURL) GetFile

func (x *ExpandedURL) GetFile() *Upload

func (*ExpandedURL) GetSnippet

func (x *ExpandedURL) GetSnippet() *Snippet

func (*ExpandedURL) GetUrl

func (x *ExpandedURL) GetUrl() *Redirect

func (*ExpandedURL) ProtoMessage

func (*ExpandedURL) ProtoMessage()

func (*ExpandedURL) ProtoReflect

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

func (*ExpandedURL) Reset

func (x *ExpandedURL) Reset()

func (*ExpandedURL) String

func (x *ExpandedURL) String() string

type ExpandedURL_File

type ExpandedURL_File struct {
	File *Upload `protobuf:"bytes,2,opt,name=file,proto3,oneof"`
}

type ExpandedURL_Snippet

type ExpandedURL_Snippet struct {
	Snippet *Snippet `protobuf:"bytes,3,opt,name=snippet,proto3,oneof"`
}

type ExpandedURL_Url

type ExpandedURL_Url struct {
	Url *Redirect `protobuf:"bytes,1,opt,name=url,proto3,oneof"`
}

type FileUploadClient

type FileUploadClient interface {
	PostFileUpload(ctx context.Context, in *PostFileUploadRequest, opts ...grpc.CallOption) (*PostFileUploadResponse, error)
}

FileUploadClient is the client API for FileUpload 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 NewFileUploadClient

func NewFileUploadClient(cc grpc.ClientConnInterface) FileUploadClient

type FileUploadServer

type FileUploadServer interface {
	PostFileUpload(context.Context, *PostFileUploadRequest) (*PostFileUploadResponse, error)
}

FileUploadServer is the server API for FileUpload service. All implementations should embed UnimplementedFileUploadServer for forward compatibility

type GetShrlRequest

type GetShrlRequest struct {
	Shrl *Ref_ShortURL `protobuf:"bytes,1,opt,name=shrl,proto3" json:"shrl,omitempty"`
	// contains filtered or unexported fields
}

======================================== Server Methods ======================================== Shrls.GetShrl

func (*GetShrlRequest) Descriptor deprecated

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

Deprecated: Use GetShrlRequest.ProtoReflect.Descriptor instead.

func (*GetShrlRequest) GetShrl

func (x *GetShrlRequest) GetShrl() *Ref_ShortURL

func (*GetShrlRequest) ProtoMessage

func (*GetShrlRequest) ProtoMessage()

func (*GetShrlRequest) ProtoReflect

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

func (*GetShrlRequest) Reset

func (x *GetShrlRequest) Reset()

func (*GetShrlRequest) String

func (x *GetShrlRequest) String() string

type GetShrlResponse

type GetShrlResponse struct {
	Shrl *ShortURL `protobuf:"bytes,1,opt,name=shrl,proto3" json:"shrl,omitempty"`
	// contains filtered or unexported fields
}

func (*GetShrlResponse) Descriptor deprecated

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

Deprecated: Use GetShrlResponse.ProtoReflect.Descriptor instead.

func (*GetShrlResponse) GetShrl

func (x *GetShrlResponse) GetShrl() *ShortURL

func (*GetShrlResponse) ProtoMessage

func (*GetShrlResponse) ProtoMessage()

func (*GetShrlResponse) ProtoReflect

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

func (*GetShrlResponse) Reset

func (x *GetShrlResponse) Reset()

func (*GetShrlResponse) String

func (x *GetShrlResponse) String() string

type GetShrlsRequest

type GetShrlsRequest struct {
	Shrl *Ref_ShortURL `protobuf:"bytes,1,opt,name=shrl,proto3" json:"shrl,omitempty"`
	// contains filtered or unexported fields
}

Shrls.GetShrls

func (*GetShrlsRequest) Descriptor deprecated

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

Deprecated: Use GetShrlsRequest.ProtoReflect.Descriptor instead.

func (*GetShrlsRequest) GetShrl

func (x *GetShrlsRequest) GetShrl() *Ref_ShortURL

func (*GetShrlsRequest) ProtoMessage

func (*GetShrlsRequest) ProtoMessage()

func (*GetShrlsRequest) ProtoReflect

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

func (*GetShrlsRequest) Reset

func (x *GetShrlsRequest) Reset()

func (*GetShrlsRequest) String

func (x *GetShrlsRequest) String() string

type GetShrlsResponse

type GetShrlsResponse struct {
	Shrls []*ShortURL `protobuf:"bytes,1,rep,name=shrls,proto3" json:"shrls,omitempty"`
	// contains filtered or unexported fields
}

func (*GetShrlsResponse) Descriptor deprecated

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

Deprecated: Use GetShrlsResponse.ProtoReflect.Descriptor instead.

func (*GetShrlsResponse) GetShrls

func (x *GetShrlsResponse) GetShrls() []*ShortURL

func (*GetShrlsResponse) ProtoMessage

func (*GetShrlsResponse) ProtoMessage()

func (*GetShrlsResponse) ProtoReflect

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

func (*GetShrlsResponse) Reset

func (x *GetShrlsResponse) Reset()

func (*GetShrlsResponse) String

func (x *GetShrlsResponse) String() string

type ListShrlsRequest

type ListShrlsRequest struct {
	Search *string `protobuf:"bytes,1,opt,name=search,proto3,oneof" json:"search,omitempty"`
	Page   *int64  `protobuf:"varint,2,opt,name=page,proto3,oneof" json:"page,omitempty"`
	Count  *int64  `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"`
	// contains filtered or unexported fields
}

Shrls.ListShrls (Paginated)

func (*ListShrlsRequest) Descriptor deprecated

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

Deprecated: Use ListShrlsRequest.ProtoReflect.Descriptor instead.

func (*ListShrlsRequest) GetCount

func (x *ListShrlsRequest) GetCount() int64

func (*ListShrlsRequest) GetPage

func (x *ListShrlsRequest) GetPage() int64

func (*ListShrlsRequest) GetSearch

func (x *ListShrlsRequest) GetSearch() string

func (*ListShrlsRequest) ProtoMessage

func (*ListShrlsRequest) ProtoMessage()

func (*ListShrlsRequest) ProtoReflect

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

func (*ListShrlsRequest) Reset

func (x *ListShrlsRequest) Reset()

func (*ListShrlsRequest) String

func (x *ListShrlsRequest) String() string

type ListShrlsResponse

type ListShrlsResponse struct {
	Shrls      []*ShortURL `protobuf:"bytes,1,rep,name=shrls,proto3" json:"shrls,omitempty"`
	TotalShrls int64       `protobuf:"varint,2,opt,name=total_shrls,json=totalShrls,proto3" json:"total_shrls,omitempty"`
	// contains filtered or unexported fields
}

func (*ListShrlsResponse) Descriptor deprecated

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

Deprecated: Use ListShrlsResponse.ProtoReflect.Descriptor instead.

func (*ListShrlsResponse) GetShrls

func (x *ListShrlsResponse) GetShrls() []*ShortURL

func (*ListShrlsResponse) GetTotalShrls

func (x *ListShrlsResponse) GetTotalShrls() int64

func (*ListShrlsResponse) ProtoMessage

func (*ListShrlsResponse) ProtoMessage()

func (*ListShrlsResponse) ProtoReflect

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

func (*ListShrlsResponse) Reset

func (x *ListShrlsResponse) Reset()

func (*ListShrlsResponse) String

func (x *ListShrlsResponse) String() string

type PostFileUploadRequest

type PostFileUploadRequest struct {
	File []byte `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	// contains filtered or unexported fields
}

FileUpload.PostFileUpload

func (*PostFileUploadRequest) Descriptor deprecated

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

Deprecated: Use PostFileUploadRequest.ProtoReflect.Descriptor instead.

func (*PostFileUploadRequest) GetFile

func (x *PostFileUploadRequest) GetFile() []byte

func (*PostFileUploadRequest) ProtoMessage

func (*PostFileUploadRequest) ProtoMessage()

func (*PostFileUploadRequest) ProtoReflect

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

func (*PostFileUploadRequest) Reset

func (x *PostFileUploadRequest) Reset()

func (*PostFileUploadRequest) String

func (x *PostFileUploadRequest) String() string

type PostFileUploadResponse

type PostFileUploadResponse struct {
	File *Ref_FileUpload `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	// contains filtered or unexported fields
}

func (*PostFileUploadResponse) Descriptor deprecated

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

Deprecated: Use PostFileUploadResponse.ProtoReflect.Descriptor instead.

func (*PostFileUploadResponse) GetFile

func (x *PostFileUploadResponse) GetFile() *Ref_FileUpload

func (*PostFileUploadResponse) ProtoMessage

func (*PostFileUploadResponse) ProtoMessage()

func (*PostFileUploadResponse) ProtoReflect

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

func (*PostFileUploadResponse) Reset

func (x *PostFileUploadResponse) Reset()

func (*PostFileUploadResponse) String

func (x *PostFileUploadResponse) String() string

type PostShrlRequest

type PostShrlRequest struct {
	Shrl *ShortURL `protobuf:"bytes,1,opt,name=shrl,proto3" json:"shrl,omitempty"`
	// contains filtered or unexported fields
}

Shrls.PostShrl

func (*PostShrlRequest) Descriptor deprecated

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

Deprecated: Use PostShrlRequest.ProtoReflect.Descriptor instead.

func (*PostShrlRequest) GetShrl

func (x *PostShrlRequest) GetShrl() *ShortURL

func (*PostShrlRequest) ProtoMessage

func (*PostShrlRequest) ProtoMessage()

func (*PostShrlRequest) ProtoReflect

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

func (*PostShrlRequest) Reset

func (x *PostShrlRequest) Reset()

func (*PostShrlRequest) String

func (x *PostShrlRequest) String() string

type PostShrlResponse

type PostShrlResponse struct {
	Shrl *ShortURL `protobuf:"bytes,1,opt,name=shrl,proto3" json:"shrl,omitempty"`
	// contains filtered or unexported fields
}

func (*PostShrlResponse) Descriptor deprecated

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

Deprecated: Use PostShrlResponse.ProtoReflect.Descriptor instead.

func (*PostShrlResponse) GetShrl

func (x *PostShrlResponse) GetShrl() *ShortURL

func (*PostShrlResponse) ProtoMessage

func (*PostShrlResponse) ProtoMessage()

func (*PostShrlResponse) ProtoReflect

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

func (*PostShrlResponse) Reset

func (x *PostShrlResponse) Reset()

func (*PostShrlResponse) String

func (x *PostShrlResponse) String() string

type PutShrlRequest

type PutShrlRequest struct {
	Shrl *ShortURL `protobuf:"bytes,1,opt,name=shrl,proto3" json:"shrl,omitempty"`
	// contains filtered or unexported fields
}

Shrls.PutShrl

func (*PutShrlRequest) Descriptor deprecated

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

Deprecated: Use PutShrlRequest.ProtoReflect.Descriptor instead.

func (*PutShrlRequest) GetShrl

func (x *PutShrlRequest) GetShrl() *ShortURL

func (*PutShrlRequest) ProtoMessage

func (*PutShrlRequest) ProtoMessage()

func (*PutShrlRequest) ProtoReflect

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

func (*PutShrlRequest) Reset

func (x *PutShrlRequest) Reset()

func (*PutShrlRequest) String

func (x *PutShrlRequest) String() string

type PutShrlResponse

type PutShrlResponse struct {
	Shrl *ShortURL `protobuf:"bytes,1,opt,name=shrl,proto3" json:"shrl,omitempty"`
	// contains filtered or unexported fields
}

func (*PutShrlResponse) Descriptor deprecated

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

Deprecated: Use PutShrlResponse.ProtoReflect.Descriptor instead.

func (*PutShrlResponse) GetShrl

func (x *PutShrlResponse) GetShrl() *ShortURL

func (*PutShrlResponse) ProtoMessage

func (*PutShrlResponse) ProtoMessage()

func (*PutShrlResponse) ProtoReflect

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

func (*PutShrlResponse) Reset

func (x *PutShrlResponse) Reset()

func (*PutShrlResponse) String

func (x *PutShrlResponse) String() string

type Redirect

type Redirect struct {
	Url     string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Favicon []byte `protobuf:"bytes,2,opt,name=favicon,proto3" json:"favicon,omitempty"`
	// contains filtered or unexported fields
}

Url Redirects

func (*Redirect) Descriptor deprecated

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

Deprecated: Use Redirect.ProtoReflect.Descriptor instead.

func (*Redirect) GetFavicon

func (x *Redirect) GetFavicon() []byte

func (*Redirect) GetUrl

func (x *Redirect) GetUrl() string

func (*Redirect) ProtoMessage

func (*Redirect) ProtoMessage()

func (*Redirect) ProtoReflect

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

func (*Redirect) Reset

func (x *Redirect) Reset()

func (*Redirect) String

func (x *Redirect) String() string

type Ref

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

======================================== References ========================================

func (*Ref) Descriptor deprecated

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

Deprecated: Use Ref.ProtoReflect.Descriptor instead.

func (*Ref) ProtoMessage

func (*Ref) ProtoMessage()

func (*Ref) ProtoReflect

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

func (*Ref) Reset

func (x *Ref) Reset()

func (*Ref) String

func (x *Ref) String() string

type Ref_FileUpload

type Ref_FileUpload struct {

	// Types that are assignable to Ref:
	//
	//	*Ref_FileUpload_Id
	Ref isRef_FileUpload_Ref `protobuf_oneof:"ref"`
	// contains filtered or unexported fields
}

func (*Ref_FileUpload) Descriptor deprecated

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

Deprecated: Use Ref_FileUpload.ProtoReflect.Descriptor instead.

func (*Ref_FileUpload) GetId

func (x *Ref_FileUpload) GetId() string

func (*Ref_FileUpload) GetRef

func (m *Ref_FileUpload) GetRef() isRef_FileUpload_Ref

func (*Ref_FileUpload) ProtoMessage

func (*Ref_FileUpload) ProtoMessage()

func (*Ref_FileUpload) ProtoReflect

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

func (*Ref_FileUpload) Reset

func (x *Ref_FileUpload) Reset()

func (*Ref_FileUpload) String

func (x *Ref_FileUpload) String() string

type Ref_FileUpload_Id

type Ref_FileUpload_Id struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"`
}

type Ref_ShortURL

type Ref_ShortURL struct {

	// Types that are assignable to Ref:
	//
	//	*Ref_ShortURL_Id
	//	*Ref_ShortURL_Alias
	Ref isRef_ShortURL_Ref `protobuf_oneof:"ref"`
	// contains filtered or unexported fields
}

Reference ShortURL

func (*Ref_ShortURL) Descriptor deprecated

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

Deprecated: Use Ref_ShortURL.ProtoReflect.Descriptor instead.

func (*Ref_ShortURL) GetAlias

func (x *Ref_ShortURL) GetAlias() string

func (*Ref_ShortURL) GetId

func (x *Ref_ShortURL) GetId() string

func (*Ref_ShortURL) GetRef

func (m *Ref_ShortURL) GetRef() isRef_ShortURL_Ref

func (*Ref_ShortURL) ProtoMessage

func (*Ref_ShortURL) ProtoMessage()

func (*Ref_ShortURL) ProtoReflect

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

func (*Ref_ShortURL) Reset

func (x *Ref_ShortURL) Reset()

func (*Ref_ShortURL) String

func (x *Ref_ShortURL) String() string

type Ref_ShortURL_Alias

type Ref_ShortURL_Alias struct {
	Alias string `protobuf:"bytes,2,opt,name=alias,proto3,oneof"`
}

type Ref_ShortURL_Id

type Ref_ShortURL_Id struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"`
}

type ShortURL

type ShortURL struct {
	Id        string                `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                                       // External ID for ShortURL
	CreatedAt int64                 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`       // Date the ShortURL was created at
	Type      ShortURL_ShortURLType `protobuf:"varint,3,opt,name=type,proto3,enum=shrls.ShortURL_ShortURLType" json:"type,omitempty"` // ShortURL type
	Stub      string                `protobuf:"bytes,4,opt,name=stub,proto3" json:"stub,omitempty"`                                   // URL stub
	Content   *ExpandedURL          `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`                             // Expanded destination
	Views     int64                 `protobuf:"varint,6,opt,name=views,proto3" json:"views,omitempty"`                                // Number of times the link has been clicked
	Tags      []string              `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"`                                   // User defined tags for the ShortURL to aid searching
	// contains filtered or unexported fields
}

======================================== Objects ======================================== Shortened Urls

func (*ShortURL) Descriptor deprecated

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

Deprecated: Use ShortURL.ProtoReflect.Descriptor instead.

func (*ShortURL) GetContent

func (x *ShortURL) GetContent() *ExpandedURL

func (*ShortURL) GetCreatedAt

func (x *ShortURL) GetCreatedAt() int64

func (*ShortURL) GetId

func (x *ShortURL) GetId() string

func (*ShortURL) GetStub

func (x *ShortURL) GetStub() string

func (*ShortURL) GetTags

func (x *ShortURL) GetTags() []string

func (*ShortURL) GetType

func (x *ShortURL) GetType() ShortURL_ShortURLType

func (*ShortURL) GetViews

func (x *ShortURL) GetViews() int64

func (*ShortURL) ProtoMessage

func (*ShortURL) ProtoMessage()

func (*ShortURL) ProtoReflect

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

func (*ShortURL) Reset

func (x *ShortURL) Reset()

func (*ShortURL) String

func (x *ShortURL) String() string

type ShortURL_ShortURLType

type ShortURL_ShortURLType int32
const (
	ShortURL_LINK    ShortURL_ShortURLType = 0
	ShortURL_UPLOAD  ShortURL_ShortURLType = 1
	ShortURL_SNIPPET ShortURL_ShortURLType = 2
)

func (ShortURL_ShortURLType) Descriptor

func (ShortURL_ShortURLType) Enum

func (ShortURL_ShortURLType) EnumDescriptor deprecated

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

Deprecated: Use ShortURL_ShortURLType.Descriptor instead.

func (ShortURL_ShortURLType) Number

func (ShortURL_ShortURLType) String

func (x ShortURL_ShortURLType) String() string

func (ShortURL_ShortURLType) Type

type ShrlsClient

type ShrlsClient interface {
	GetShrl(ctx context.Context, in *GetShrlRequest, opts ...grpc.CallOption) (*GetShrlResponse, error)
	GetShrls(ctx context.Context, in *GetShrlsRequest, opts ...grpc.CallOption) (*GetShrlsResponse, error)
	ListShrls(ctx context.Context, in *ListShrlsRequest, opts ...grpc.CallOption) (*ListShrlsResponse, error)
	PutShrl(ctx context.Context, in *PutShrlRequest, opts ...grpc.CallOption) (*PutShrlResponse, error)
	PostShrl(ctx context.Context, in *PostShrlRequest, opts ...grpc.CallOption) (*PostShrlResponse, error)
	DeleteShrl(ctx context.Context, in *DeleteShrlRequest, opts ...grpc.CallOption) (*DeleteShrlResponse, error)
}

ShrlsClient is the client API for Shrls 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 NewShrlsClient

func NewShrlsClient(cc grpc.ClientConnInterface) ShrlsClient

type ShrlsServer

ShrlsServer is the server API for Shrls service. All implementations should embed UnimplementedShrlsServer for forward compatibility

type Snippet

type Snippet struct {
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Body  []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

Text snippets

func (*Snippet) Descriptor deprecated

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

Deprecated: Use Snippet.ProtoReflect.Descriptor instead.

func (*Snippet) GetBody

func (x *Snippet) GetBody() []byte

func (*Snippet) GetTitle

func (x *Snippet) GetTitle() string

func (*Snippet) ProtoMessage

func (*Snippet) ProtoMessage()

func (*Snippet) ProtoReflect

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

func (*Snippet) Reset

func (x *Snippet) Reset()

func (*Snippet) String

func (x *Snippet) String() string

type UnimplementedFileUploadServer

type UnimplementedFileUploadServer struct {
}

UnimplementedFileUploadServer should be embedded to have forward compatible implementations.

func (UnimplementedFileUploadServer) PostFileUpload

type UnimplementedShrlsServer

type UnimplementedShrlsServer struct {
}

UnimplementedShrlsServer should be embedded to have forward compatible implementations.

func (UnimplementedShrlsServer) DeleteShrl

func (UnimplementedShrlsServer) GetShrl

func (UnimplementedShrlsServer) GetShrls

func (UnimplementedShrlsServer) ListShrls

func (UnimplementedShrlsServer) PostShrl

func (UnimplementedShrlsServer) PutShrl

type UnsafeFileUploadServer

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

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

type UnsafeShrlsServer

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

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

type Upload

type Upload struct {
	Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // Reference to pass to storage backend to find uploaded file
	// contains filtered or unexported fields
}

File Upload

func (*Upload) Descriptor deprecated

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

Deprecated: Use Upload.ProtoReflect.Descriptor instead.

func (*Upload) GetRef

func (x *Upload) GetRef() string

func (*Upload) ProtoMessage

func (*Upload) ProtoMessage()

func (*Upload) ProtoReflect

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

func (*Upload) Reset

func (x *Upload) Reset()

func (*Upload) String

func (x *Upload) String() string

Directories

Path Synopsis
Package gen is a reverse proxy.
Package gen is a reverse proxy.

Jump to

Keyboard shortcuts

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