services

package
v0.0.0-...-ae79bc6 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

---------------------------------------------------------------------------------------------- // -- Copyright (c) 2024 Braden Hitchcock - MIT License (https://opensource.org/licenses/MIT) -- // ---------------------------------------------------------------------------------------------- //

---------------------------------------------------------------------------------------------- // -- Copyright (c) 2024 Braden Hitchcock - MIT License (https://opensource.org/licenses/MIT) -- // ---------------------------------------------------------------------------------------------- //

---------------------------------------------------------------------------------------------- // -- Copyright (c) 2024 Braden Hitchcock - MIT License (https://opensource.org/licenses/MIT) -- // ---------------------------------------------------------------------------------------------- //

---------------------------------------------------------------------------------------------- // -- Copyright (c) 2024 Braden Hitchcock - MIT License (https://opensource.org/licenses/MIT) -- // ---------------------------------------------------------------------------------------------- //

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConversationService

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

func NewConversationService

func NewConversationService(store store.ConversationStore) ConversationService

func (*ConversationService) Add

func (*ConversationService) AddMods

func (*ConversationService) Get

func (*ConversationService) ListAll

func (s *ConversationService) ListAll(
	ctx context.Context, key crypto.Key,
) ([]*types.Conversation, error)

func (*ConversationService) Remove

func (*ConversationService) RemoveMods

func (*ConversationService) Update

type GroupService

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

func NewGroupService

func NewGroupService(store store.GroupStore) GroupService

func (GroupService) Authenticate

func (g GroupService) Authenticate(
	ctx context.Context, req *commands.CmdAuthenticateGroup,
) (crypto.Key, error)

func (GroupService) ChangePassword

func (g GroupService) ChangePassword(
	ctx context.Context, req *commands.CmdUpdateGroupPassword, dkey crypto.Key,
) error

func (GroupService) Create

func (svc GroupService) Create(ctx context.Context, req *commands.CmdInitGroup) (*types.Group, error)

func (GroupService) Get

func (g GroupService) Get(ctx context.Context, dkey crypto.Key) (*types.Group, error)

func (GroupService) Update

func (g GroupService) Update(
	ctx context.Context, req *commands.CmdUpdateGroup, dkey crypto.Key,
) (*types.Group, error)

type MemberService

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

func NewMemberService

func NewMemberService(store store.MemberStore) MemberService

func (*MemberService) Authenticate

func (s *MemberService) Authenticate(
	ctx context.Context, req *commands.CmdAuthenticateMember, key crypto.Key,
) (*types.Member, error)

func (*MemberService) ChangePassword

func (s *MemberService) ChangePassword(
	ctx context.Context, req *commands.CmdUpdateMemberPassword,
) error

func (*MemberService) Create

func (s *MemberService) Create(
	ctx context.Context, req *commands.CmdAddMember, key crypto.Key,
) (*types.Member, error)

func (*MemberService) FindMemberByUsername

func (s *MemberService) FindMemberByUsername(
	ctx context.Context, req *queries.ReqGetMember, key crypto.Key,
) (*types.Member, error)

func (*MemberService) ListMembers

func (s *MemberService) ListMembers(ctx context.Context, key crypto.Key) ([]*types.Member, error)

func (*MemberService) RemoveMember

func (s *MemberService) RemoveMember(ctx context.Context, req *commands.CmdRemoveMember) error

func (*MemberService) UpdateMember

func (s *MemberService) UpdateMember(
	ctx context.Context, req *commands.CmdUpdateMember, key crypto.Key,
) (*types.Member, error)

type MessageService

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

func NewMessageService

func NewMessageService(store store.MessageStore) MessageService

func (*MessageService) Add

func (*MessageService) Get

func (*MessageService) List

func (s *MessageService) List(
	ctx context.Context, req *queries.ReqListMessages, key crypto.Key,
) ([]*types.Message, error)

func (*MessageService) Remove

func (*MessageService) Update

Jump to

Keyboard shortcuts

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