services

package
v0.0.0-...-5c9d85b Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMessageService

func NewMessageService(httpClient http.Client, BaseURL string) *messageService

func NewTopicService

func NewTopicService(httpClient http.Client, BaseURL string) *topicService

func NewUserService

func NewUserService(httpClient http.Client, BaseURL string) *userService

Types

type MarkAllMessagesRequestPayload

type MarkAllMessagesRequestPayload struct {
	Accesstoken string `json:"accesstoken"`
}

type MarkOneMessageRequestPayload

type MarkOneMessageRequestPayload struct {
	Accesstoken string `json:"accesstoken"`
}

type MessageService

type MessageService interface {
	GetMessages(accesstoken, mdrender string) *model.MessagesResponse
	GetUnreadMessage(accesstoken string) int
	MarkOneMessage(accesstoken, id string) *string
	MarkAllMessages(accesstoken string) []*model.MarkedMessage
}

type TopicService

type TopicService interface {
	GetTopicsByPage(params *model.TopicsRequestParams) []*model.Topic
	GetTopicById(params *model.TopicRequestParams) *model.TopicDetail
}

type UserService

type UserService interface {
	GetUserByLoginname(loginname string) *model.UserDetail
	ValidateAccessToken(accesstoken string) *model.UserEntity
}

Jump to

Keyboard shortcuts

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