Documentation
¶
Index ¶
- Constants
- type NIPClient
- func (c *NIPClient) AddNatsPermission(dto *dto.AddNatsPermissionDto) (*common.BaseResponse, error)
- func (c *NIPClient) CreateDevice(dtop *dto.CreateDeviceDto) (*dto.Device, error)
- func (c *NIPClient) CreateNatsUser() (*common.BaseResponse, error)
- func (c *NIPClient) CreateProduct(dto *dto.CreateProductDto) (*dto.Product, error)
- func (c *NIPClient) CreateRuleForward(dto *dto.CreateRuleForwardDto) (*common.BaseResponse, error)
- func (c *NIPClient) DeleteDevice(deviceKey string) (*common.BaseResponse, error)
- func (c *NIPClient) DeleteNatsPermission(dto *dto.DeleteNatsPermissionDto) (*common.BaseResponse, error)
- func (c *NIPClient) DeleteProduct(productKey string) (*common.BaseResponse, error)
- func (c *NIPClient) DeleteRuleForward(ruleKey string) (*common.BaseResponse, error)
- func (c *NIPClient) GetDevice(dto *dto.GetDeviceDto) (*dto.Device, error)
- func (c *NIPClient) GetNatsPermission() (*dto.NatsPermission, error)
- func (c *NIPClient) GetNatsStatus() (*dto.NatsStatus, error)
- func (c *NIPClient) GetNatsUser() (*dto.NatsUser, error)
- func (c *NIPClient) GetProduct(productKey string) (*dto.Product, error)
- func (c *NIPClient) GetRuleForward(ruleKey string) (*dto.RuleForward, error)
- func (c *NIPClient) ListDevice(pagination common.PaginationParams) (deviceListResp dto.ListDeviceDto, err error)
- func (c *NIPClient) ListProduct(pagination common.PaginationParams) (productListResp dto.ListProductDto, err error)
- func (c *NIPClient) ListRuleForward(pagination common.PaginationParams) (ruleListResp dto.ListRuleForwardDto, err error)
- func (c *NIPClient) SendHttpRequest(requestUrl string, method string, reqDto interface{}) ([]byte, error)
- func (c *NIPClient) UpdateDevice(dto *dto.UpdateDeviceDto) (*dto.Device, error)
- func (c *NIPClient) UpdateProduct(dto *dto.UpdateProductDto) (*dto.Product, error)
- func (c *NIPClient) UpdateRuleForward(dto *dto.UpdateRuleForwardDto) (*common.BaseResponse, error)
- type NIPClientOptions
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 (*NIPClient) CreateNatsUser ¶
func (c *NIPClient) CreateNatsUser() (*common.BaseResponse, error)
若该uid未开通NATS功能,则开通该uid的NATS功能
func (*NIPClient) CreateProduct ¶
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) 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 ¶
获取该uid的所有NATS配置信息
func (*NIPClient) GetProduct ¶
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 (*NIPClient) UpdateDevice ¶
func (*NIPClient) UpdateProduct ¶
func (*NIPClient) UpdateRuleForward ¶
func (c *NIPClient) UpdateRuleForward(dto *dto.UpdateRuleForwardDto) (*common.BaseResponse, error)
Click to show internal directories.
Click to hide internal directories.