service

package
v0.0.0-...-70a47ec Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientServiceApp = ClientService{}
View Source
var DefaultLogtoResource = "https://default.logto.app/api"
View Source
var EventServiceApp = EventService{}
View Source
var MemberServiceApp = new(MemberService)

Functions

This section is empty.

Types

type ClientService

type ClientService struct {
}

func (ClientService) CreateClientByOpenId

func (service ClientService) CreateClientByOpenId(openId string) (model.Client, error)

func (ClientService) CreateTokenViaWechat

func (service ClientService) CreateTokenViaWechat(client model.Client) (string, error)

func (ClientService) GetClientByOpenId

func (service ClientService) GetClientByOpenId(openId string) (model.Client, error)

type EventService

type EventService struct{}

func (EventService) Act

func (service EventService) Act(event *model.Event, identity model.Identity, action util.Action, description ...string) error

this function validates the action and then perform action to the event. it also persists the event and event log.

func (EventService) CreateEvent

func (service EventService) CreateEvent(event *model.Event) error

func (EventService) GetClientEvents

func (service EventService) GetClientEvents(f repo.EventFilter, clientId string) ([]model.Event, error)

func (EventService) GetEventById

func (service EventService) GetEventById(id int64) (model.Event, error)

func (EventService) GetMemberEvents

func (service EventService) GetMemberEvents(f repo.EventFilter, memberId string) ([]model.Event, error)

func (EventService) GetPublicEventById

func (service EventService) GetPublicEventById(id int64) (model.PublicEvent, error)

func (EventService) GetPublicEvents

func (service EventService) GetPublicEvents(f repo.EventFilter) ([]model.PublicEvent, error)

func (EventService) SendActionNotify

func (service EventService) SendActionNotify(event *model.Event, subject string) error

func (EventService) SendActionNotifyViaMail

func (service EventService) SendActionNotifyViaMail(event *model.Event, subject string) error

func (EventService) SendActionNotifyViaRPC

func (service EventService) SendActionNotifyViaRPC(req *model.EventActionNotifyRequest) error

type LogtoService

type LogtoService struct {
	BaseURL string
}
var LogtoServiceApp LogtoService

func MakeLogtoService

func MakeLogtoService(endpoint string) LogtoService

func (LogtoService) FetchLogtoToken

func (l LogtoService) FetchLogtoToken(resource string, scope string) (map[string]interface{}, error)

func (LogtoService) FetchUserById

func (l LogtoService) FetchUserById(userId string, token string) (map[string]interface{}, error)

func (LogtoService) FetchUserByToken

func (l LogtoService) FetchUserByToken(token string, accessToken string) (map[string]interface{}, error)

func (LogtoService) PatchUserById

func (l LogtoService) PatchUserById(userId string, data dto.PatchLogtoUserRequest, token string) (map[string]interface{}, error)

type MemberService

type MemberService struct{}

func (*MemberService) ActivateMember

func (service *MemberService) ActivateMember(member model.Member) error

func (*MemberService) CreateMember

func (service *MemberService) CreateMember(member *model.Member) error

func (*MemberService) CreateToken

func (service *MemberService) CreateToken(member model.Member) (string, error)

func (*MemberService) GetMemberById

func (service *MemberService) GetMemberById(id string) (model.Member, error)

func (*MemberService) GetMembers

func (service *MemberService) GetMembers(offset uint64, limit uint64) ([]model.Member, error)

func (*MemberService) GetPublicMemberById

func (service *MemberService) GetPublicMemberById(id string) (model.PublicMember, error)

func (*MemberService) GetPublicMembers

func (service *MemberService) GetPublicMembers(offset uint64, limit uint64) ([]model.PublicMember, error)

func (*MemberService) UpdateMember

func (service *MemberService) UpdateMember(member model.Member) error

Jump to

Keyboard shortcuts

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