Documentation ¶
Index ¶
- func MemberToActor(c *fiber.Ctx, member *member.Member) ([]byte, error)
- type IMemberController
- type MemberController
- func (mc *MemberController) Check(c *fiber.Ctx) error
- func (mc *MemberController) DeleteMember(c *fiber.Ctx) error
- func (mc *MemberController) GetFollowers(c *fiber.Ctx) error
- func (mc *MemberController) GetID(c *fiber.Ctx) error
- func (mc *MemberController) GetMemberByNickOrEmail(c *fiber.Ctx) error
- func (mc *MemberController) GetMemberByWebfinger(c *fiber.Ctx) error
- func (mc *MemberController) Update(c *fiber.Ctx) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IMemberController ¶
type IMemberController interface { GetMember(c *fiber.Ctx) error UpdateMember(c *fiber.Ctx) error DeleteMember(c *fiber.Ctx) error }
IMemberController is the interface for the member controller It defines the methods that the member controller must implement This is useful for mocking the member controller in unit tests
type MemberController ¶
type MemberController struct {
// contains filtered or unexported fields
}
MemberController is the controller for member endpoints
func NewController ¶
func NewController( storage member.MemberStorer, db *sqlx.DB, logger *zerolog.Logger, conf *cfg.Config, ) *MemberController
func (*MemberController) Check ¶ added in v0.7.0
func (mc *MemberController) Check(c *fiber.Ctx) error
check checks for the existence of a member it requires both nickname and email to be provided
func (*MemberController) DeleteMember ¶
func (mc *MemberController) DeleteMember(c *fiber.Ctx) error
DeleteMember handles the deletion of an user
func (*MemberController) GetFollowers ¶
func (mc *MemberController) GetFollowers(c *fiber.Ctx) error
func (*MemberController) GetID ¶ added in v0.6.5
func (mc *MemberController) GetID(c *fiber.Ctx) error
func (*MemberController) GetMemberByNickOrEmail ¶ added in v0.7.0
func (mc *MemberController) GetMemberByNickOrEmail(c *fiber.Ctx) error
func (*MemberController) GetMemberByWebfinger ¶ added in v0.6.5
func (mc *MemberController) GetMemberByWebfinger(c *fiber.Ctx) error
TODO: add webfinger to database
func (*MemberController) Update ¶ added in v0.7.3
func (mc *MemberController) Update(c *fiber.Ctx) (err error)
UpdateMember handles the updating of user information
Click to show internal directories.
Click to hide internal directories.