Documentation ¶
Index ¶
- type UDPPacket
- type UDPPacketRepo
- type UDPPacketUsecase
- func (uc *UDPPacketUsecase) Create(ctx context.Context, udp *UDPPacket) (*UDPPacket, error)
- func (uc *UDPPacketUsecase) Delete(ctx context.Context, name string) error
- func (uc *UDPPacketUsecase) Get(ctx context.Context, name string) (*UDPPacket, error)
- func (uc *UDPPacketUsecase) List(ctx context.Context) (*UDPPackets, error)
- func (uc *UDPPacketUsecase) Update(ctx context.Context, udp *UDPPacket) (*UDPPacket, error)
- type UDPPackets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UDPPacket ¶
type UDPPacket struct {
Name, Id, Title, Content string
UpdateTime *timestamppb.Timestamp
}
type UDPPacketRepo ¶
type UDPPacketRepo interface { ListUDPPackets(ctx context.Context) (*UDPPackets, error) // name means the last part of url path like `/udp/uuid`, uuid is name GetUDPPacket(ctx context.Context, name string) (*UDPPacket, error) CreateUDPPacket(ctx context.Context, udp *UDPPacket) (*UDPPacket, error) UpdateUDPPacket(ctx context.Context, udp *UDPPacket) (*UDPPacket, error) // name means the last part of url path like `/udp/uuid`, uuid is name DeleteUDPPacket(ctx context.Context, name string) error }
type UDPPacketUsecase ¶
type UDPPacketUsecase struct {
// contains filtered or unexported fields
}
func NewUDPPacketUsecase ¶
func NewUDPPacketUsecase(repo UDPPacketRepo) *UDPPacketUsecase
func (*UDPPacketUsecase) Delete ¶
func (uc *UDPPacketUsecase) Delete(ctx context.Context, name string) error
func (*UDPPacketUsecase) List ¶
func (uc *UDPPacketUsecase) List(ctx context.Context) (*UDPPackets, error)
type UDPPackets ¶
Click to show internal directories.
Click to hide internal directories.