huawei

package
v0.0.0-...-d0b798f Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *Config) (push.Push, error)

Types

type Config

type Config struct {
	ClientId       string `yaml:"client_id"`
	ClientSecret   string `yaml:"client_secret"`
	TargetUserType int    `yaml:"target_user_type"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Endpoints

type Endpoints struct {
	GetTokenEndpoint   endpoint.Endpoint
	PushNoticeEndpoint endpoint.Endpoint
	// contains filtered or unexported fields
}

type HUAWEI

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

func (*HUAWEI) PushNotice

func (p *HUAWEI) PushNotice(ctx context.Context, message *push.Message) error

type Token

type Token struct {
	AccessToken string `json:"access_token,omitempty"`
	TokenType   string `json:"token_type,omitempty"`
	ExpiresIn   int64  `json:"expires_in,omitempty"`
}

Jump to

Keyboard shortcuts

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