Documentation ¶
Overview ¶
Link entity
Index ¶
- Constants
- Variables
- func CreateHash(str, secret []byte) string
- func NewHash(url string) string
- func NewURL(link *Link) error
- type Link
- func (*Link) Descriptor() ([]byte, []int)deprecated
- func (x *Link) GetCreatedAt() *timestamppb.Timestamp
- func (x *Link) GetDescribe() string
- func (x *Link) GetFieldMask() *fieldmaskpb.FieldMask
- func (x *Link) GetHash() string
- func (x *Link) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Link) GetUrl() string
- func (*Link) ProtoMessage()
- func (x *Link) ProtoReflect() protoreflect.Message
- func (x *Link) Reset()
- func (x *Link) String() string
- type LinkEvent
- type Links
- func (*Links) Descriptor() ([]byte, []int)deprecated
- func (x *Links) GetLink() []*Link
- func (l *Links) Len() int
- func (l *Links) Less(i, j int) bool
- func (*Links) ProtoMessage()
- func (x *Links) ProtoReflect() protoreflect.Message
- func (x *Links) Reset()
- func (x *Links) String() string
- func (l *Links) Swap(i, j int)
- type NotFoundError
- type NotUniqError
Constants ¶
View Source
const ( // MQ_EVENT_LINK_NEW - subscribe on request created link MQ_EVENT_LINK_NEW = "shortlink.link.event.new" // MQ_EVENT_LINK_CREATED - subscribe on created link MQ_EVENT_LINK_CREATED = "shortlink.link.event.created" )
MQ events
Variables ¶
View Source
var ( LinkEvent_name = map[int32]string{ 0: "LINK_EVENT_UNSPECIFIED", 1: "LINK_EVENT_ADD", 2: "LINK_EVENT_GET", 3: "LINK_EVENT_LIST", 4: "LINK_EVENT_UPDATE", 5: "LINK_EVENT_DELETE", } LinkEvent_value = map[string]int32{ "LINK_EVENT_UNSPECIFIED": 0, "LINK_EVENT_ADD": 1, "LINK_EVENT_GET": 2, "LINK_EVENT_LIST": 3, "LINK_EVENT_UPDATE": 4, "LINK_EVENT_DELETE": 5, } )
Enum value maps for LinkEvent.
View Source
var ( // METHOD_ADD - new link created METHOD_ADD = notify.NewEventID() // METHOD_GET - get link METHOD_GET = notify.NewEventID() // METHOD_LIST - get links METHOD_LIST = notify.NewEventID() // METHOD_UPDATE - update link METHOD_UPDATE = notify.NewEventID() // METHOD_DELETE - delete link from system METHOD_DELETE = notify.NewEventID() )
Link CRUD methods
View Source
var File_domain_link_v1_link_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Link ¶
type Link struct { FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,6,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` // URL Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // Hash by URL + salt Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // Describe of link Describe string `protobuf:"bytes,3,opt,name=describe,proto3" json:"describe,omitempty"` // Create at CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Update at UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Link) Descriptor
deprecated
func (*Link) GetCreatedAt ¶
func (x *Link) GetCreatedAt() *timestamppb.Timestamp
func (*Link) GetDescribe ¶
func (*Link) GetFieldMask ¶
func (x *Link) GetFieldMask() *fieldmaskpb.FieldMask
func (*Link) GetUpdatedAt ¶
func (x *Link) GetUpdatedAt() *timestamppb.Timestamp
func (*Link) ProtoMessage ¶
func (*Link) ProtoMessage()
func (*Link) ProtoReflect ¶
func (x *Link) ProtoReflect() protoreflect.Message
type LinkEvent ¶
type LinkEvent int32
func (LinkEvent) Descriptor ¶
func (LinkEvent) Descriptor() protoreflect.EnumDescriptor
func (LinkEvent) EnumDescriptor
deprecated
func (LinkEvent) Number ¶
func (x LinkEvent) Number() protoreflect.EnumNumber
func (LinkEvent) Type ¶
func (LinkEvent) Type() protoreflect.EnumType
type Links ¶
type Links struct { Link []*Link `protobuf:"bytes,1,rep,name=link,proto3" json:"link,omitempty"` // contains filtered or unexported fields }
func (*Links) Descriptor
deprecated
func (*Links) ProtoMessage ¶
func (*Links) ProtoMessage()
func (*Links) ProtoReflect ¶
func (x *Links) ProtoReflect() protoreflect.Message
type NotFoundError ¶
NotFoundError - not found link
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type NotUniqError ¶
func (*NotUniqError) Error ¶
func (e *NotUniqError) Error() string
Click to show internal directories.
Click to hide internal directories.