group

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func New

func New(p groupParams) *Handler

func (*Handler) AddMember

func (h *Handler) AddMember(ctx context.Context, req *connect.Request[group.AddMemberRequest]) (*connect.Response[group.AddMemberResponse], error)

AddUser implements groupconnect.ServiceHandler

func (*Handler) Build

func (h *Handler) Build(opts ...connect.HandlerOption) (string, http.Handler)

func (*Handler) Create

func (h *Handler) Create(ctx context.Context, req *connect.Request[group.CreateRequest]) (resp *connect.Response[group.CreateResponse], err error)

Create inserts a new group in the database.

func (*Handler) Delete

func (h *Handler) Delete(ctx context.Context, req *connect.Request[group.DeleteRequest]) (resp *connect.Response[group.DeleteResponse], err error)

Delete removes the group from the database as well in all users.

func (*Handler) Get

func (h *Handler) Get(ctx context.Context, req *connect.Request[group.GetRequest]) (resp *connect.Response[group.GetResponse], err error)

Get fetches the requested group from the database.

func (Handler) GetByName

func (h Handler) GetByName(ctx context.Context, req *connect.Request[group.GetByNameRequest]) (*connect.Response[group.GetByNameResponse], error)

func (*Handler) List

func (h *Handler) List(ctx context.Context, req *connect.Request[group.ListRequest]) (*connect.Response[group.ListResponse], error)

List returns a list of groups between "from" and "to".

func (*Handler) ListGroupsForUser

func (h *Handler) ListGroupsForUser(ctx context.Context, req *connect.Request[group.ListGroupsForUserRequest]) (*connect.Response[group.ListGroupsForUserResponse], error)

GetGroups implements groupconnect.ServiceHandler

func (*Handler) ListMembers

func (h *Handler) ListMembers(ctx context.Context, req *connect.Request[group.ListMembersRequest]) (*connect.Response[group.ListMembersResponse], error)

GetMembers implements groupconnect.ServiceHandler

func (*Handler) RemoveMember

func (h *Handler) RemoveMember(ctx context.Context, req *connect.Request[group.RemoveMemberRequest]) (*connect.Response[group.RemoveMemberResponse], error)

RemoveUser implements groupconnect.ServiceHandler

func (*Handler) ServiceName

func (h *Handler) ServiceName() string

func (*Handler) Update

func (h *Handler) Update(ctx context.Context, req *connect.Request[group.UpdateRequest]) (resp *connect.Response[group.UpdateResponse], err error)

Update the group information.

Jump to

Keyboard shortcuts

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