auth

package
v0.0.0-...-db0aad3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	GetAuth(ctx context.Context) (auth *core.AuthToken, err error)
	DelAuth(ctx context.Context, token string) (err error)
	Close()
}

type AgentMgr

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

func NewAgentMgr

func NewAgentMgr() (*AgentMgr, error)

func (*AgentMgr) Close

func (m *AgentMgr) Close()

func (*AgentMgr) DelAuth

func (m *AgentMgr) DelAuth(ctx context.Context, uniqueId core.UniqueId, token string) error

func (*AgentMgr) GetAuth

func (m *AgentMgr) GetAuth(ctx context.Context, uniqueId core.UniqueId) (*core.AuthToken, error)

func (*AgentMgr) RegisterAgent

func (m *AgentMgr) RegisterAgent(uniqueId core.UniqueId, agent Agent) error

type ApnsAuth

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

func NewApnsAuth

func NewApnsAuth(privateKey, keyId, teamId string) (*ApnsAuth, error)

func (*ApnsAuth) Close

func (a *ApnsAuth) Close()

func (*ApnsAuth) DelAuth

func (a *ApnsAuth) DelAuth(ctx context.Context, token string) error

func (*ApnsAuth) GetAuth

func (a *ApnsAuth) GetAuth(ctx context.Context) (*core.AuthToken, error)

type GeTuiAuth

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

func NewGeTuiAgent

func NewGeTuiAgent(baseUrl, appId, appKey, masterSecret string, hc *http.Client) (*GeTuiAuth, error)

func (*GeTuiAuth) Close

func (g *GeTuiAuth) Close()

func (*GeTuiAuth) DelAuth

func (g *GeTuiAuth) DelAuth(ctx context.Context, token string) error

func (*GeTuiAuth) GetAuth

func (g *GeTuiAuth) GetAuth(ctx context.Context) (*core.AuthToken, error)

type Server

type Server struct {
	*proto.UnimplementedAuthServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(conf *core.PushConfig) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) DelToken

func (s *Server) DelToken(ctx context.Context, in *proto.DelTokenReq) (*proto.DelTokenResp, error)

func (*Server) GetToken

func (s *Server) GetToken(ctx context.Context, in *proto.GetTokenReq) (*proto.GetTokenResp, error)

Jump to

Keyboard shortcuts

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