nip

package
v0.0.0-...-acb24f0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientSecretPost  = "client_secret_post"
	ClientSecretBasic = "client_secret_basic"
	None              = "none"
)
View Source
const (
	SdkName         string = "nip-golang-sdk"
	Version         string = "0.1.0"
	CoreAuthApiHost string = "https://iot.netkit.cloud/api"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NIPClient

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

func NewClient

func NewClient(options *NIPClientOptions) (*NIPClient, error)

func (*NIPClient) AddNatsPermission

func (c *NIPClient) AddNatsPermission(dto *dto.AddNatsPermissionDto) (*common.BaseResponse, error)

更新该uid的NATS权限信息(添加监听的主题)

func (*NIPClient) CreateDevice

func (c *NIPClient) CreateDevice(dtop *dto.CreateDeviceDto) (*dto.Device, error)

func (*NIPClient) CreateNatsUser

func (c *NIPClient) CreateNatsUser() (*common.BaseResponse, error)

若该uid未开通NATS功能,则开通该uid的NATS功能

func (*NIPClient) CreateProduct

func (c *NIPClient) CreateProduct(dto *dto.CreateProductDto) (*dto.Product, error)

func (*NIPClient) CreateRuleForward

func (c *NIPClient) CreateRuleForward(dto *dto.CreateRuleForwardDto) (*common.BaseResponse, error)

func (*NIPClient) DeleteDevice

func (c *NIPClient) DeleteDevice(deviceKey string) (*common.BaseResponse, error)

func (*NIPClient) DeleteNatsPermission

func (c *NIPClient) DeleteNatsPermission(dto *dto.DeleteNatsPermissionDto) (*common.BaseResponse, error)

删除该uid的NATS权限信息(删除监听的主题)

func (*NIPClient) DeleteProduct

func (c *NIPClient) DeleteProduct(productKey string) (*common.BaseResponse, error)

func (*NIPClient) DeleteRuleForward

func (c *NIPClient) DeleteRuleForward(ruleKey string) (*common.BaseResponse, error)

func (*NIPClient) GetDevice

func (c *NIPClient) GetDevice(dto *dto.GetDeviceDto) (*dto.Device, error)

func (*NIPClient) GetNatsPermission

func (c *NIPClient) GetNatsPermission() (*dto.NatsPermission, error)

获取该uid的NATS权限信息

func (*NIPClient) GetNatsStatus

func (c *NIPClient) GetNatsStatus() (*dto.NatsStatus, error)

查询该uid的NATS功能是否开通

func (*NIPClient) GetNatsUser

func (c *NIPClient) GetNatsUser() (*dto.NatsUser, error)

获取该uid的所有NATS配置信息

func (*NIPClient) GetProduct

func (c *NIPClient) GetProduct(productKey string) (*dto.Product, error)

func (*NIPClient) GetRuleForward

func (c *NIPClient) GetRuleForward(ruleKey string) (*dto.RuleForward, error)

func (*NIPClient) ListDevice

func (c *NIPClient) ListDevice(pagination common.PaginationParams) (deviceListResp dto.ListDeviceDto, err error)

func (*NIPClient) ListProduct

func (c *NIPClient) ListProduct(pagination common.PaginationParams) (productListResp dto.ListProductDto, err error)

func (*NIPClient) ListRuleForward

func (c *NIPClient) ListRuleForward(pagination common.PaginationParams) (ruleListResp dto.ListRuleForwardDto, err error)

分页获取规则

func (*NIPClient) SendHttpRequest

func (c *NIPClient) SendHttpRequest(requestUrl string, method string, reqDto interface{}) ([]byte, error)

func (*NIPClient) UpdateDevice

func (c *NIPClient) UpdateDevice(dto *dto.UpdateDeviceDto) (*dto.Device, error)

func (*NIPClient) UpdateProduct

func (c *NIPClient) UpdateProduct(dto *dto.UpdateProductDto) (*dto.Product, error)

func (*NIPClient) UpdateRuleForward

func (c *NIPClient) UpdateRuleForward(dto *dto.UpdateRuleForwardDto) (*common.BaseResponse, error)

type NIPClientOptions

type NIPClientOptions struct {
	Host         string
	AccessKey    string
	AccessSecret string
	ProjectKey   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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