endpoint

package
Version: v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	*CommonEndpoint
}

func NewCheck

func NewCheck(common *CommonEndpoint) *Check

func (*Check) CheckMobileAccessToken

func (c *Check) CheckMobileAccessToken(accessToken string) (ok bool)

type CommonEndpoint

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

func NewCommonEndpoint

func NewCommonEndpoint(adaptors *adaptors.Adaptors) *CommonEndpoint

type Endpoint

type Endpoint struct {
	*Mobile
	*Server
	*Check
}

type IEndpoint

type IEndpoint interface {
	IEndpointMobile
	IEndpointServer
	IEndpointCheck
}

func NewEndpoint

func NewEndpoint(adaptors *adaptors.Adaptors) IEndpoint

type IEndpointCheck

type IEndpointCheck interface {
	CheckMobileAccessToken(string) bool
}

type IEndpointMobile

type IEndpointMobile interface {
	RegisterMobile(server *m.Server) (string, error)
	RemoveMobileToken(*m.Server, string) error
	ListMobileToken(limit, offset int64) (list []*m.Mobile, total int64, err error)
}

type IEndpointServer

type IEndpointServer interface {
	RegisterServer() (*m.Server, error)
	RemoveServerToken(*m.Server) error
}

type Mobile

type Mobile struct {
	*CommonEndpoint
}

func NewMobile

func NewMobile(common *CommonEndpoint) *Mobile

func (*Mobile) ListMobileToken

func (c *Mobile) ListMobileToken(limit, offset int64) (list []*m.Mobile, total int64, err error)

func (*Mobile) RegisterMobile

func (c *Mobile) RegisterMobile(server *m.Server) (token string, err error)

func (*Mobile) RemoveMobileToken

func (c *Mobile) RemoveMobileToken(server *m.Server, token string) (err error)

type Server

type Server struct {
	*CommonEndpoint
}

func NewServer

func NewServer(common *CommonEndpoint) *Server

func (*Server) RegisterServer

func (s *Server) RegisterServer() (server *m.Server, err error)

func (*Server) RemoveServerToken

func (s *Server) RemoveServerToken(server *m.Server) (err error)

Jump to

Keyboard shortcuts

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