Versions in this module Expand all Collapse all v1 v1.0.2 Sep 23, 2024 Changes in this version type PageMetadata + ShowFullData string v1.0.1 Sep 3, 2024 Changes in this version type SDK + DeleteUser func(id, token string) errors.SDKError v1.0.0 Jul 29, 2024 Changes in this version + const BearerPrefix + const CTBinary + const CTJSON + const CTJSONSenML + const DisabledStatus + const EnabledStatus + const MaxLevel + const MinLevel + const PasswordResetEndpoint + const ThingPrefix + var ErrFailedCreation = errors.New("failed to create entity in the db") + var ErrFailedDisable = errors.New("failed to disable client") + var ErrFailedEnable = errors.New("failed to enable client") + var ErrFailedFetch = errors.New("failed to fetch entity") + var ErrFailedList = errors.New("failed to list entities") + var ErrFailedRemoval = errors.New("failed to remove entity") + var ErrFailedUpdate = errors.New("failed to update entity") + var ErrInvalidJWT = errors.New("invalid JWT") + type BootstrapConfig struct + CACert string + Channels interface{} + ClientCert string + ClientKey string + Content string + ExternalID string + ExternalKey string + Name string + State int + ThingID string + ThingKey string + func (ts *BootstrapConfig) UnmarshalJSON(data []byte) error + type BootstrapPage struct + Configs []BootstrapConfig + type Cert struct + CertSerial string + ClientCert string + ClientKey string + Expiration time.Time + ThingID string + type CertSerials struct + Certs []Cert + type Channel struct + Children []*Channel + CreatedAt time.Time + Description string + DomainID string + ID string + Level int + Metadata Metadata + Name string + ParentID string + Path string + Permissions []string + Status string + UpdatedAt time.Time + type ChannelsPage struct + Channels []Channel + type Config struct + BootstrapURL string + CertsURL string + DomainsURL string + HTTPAdapterURL string + HostURL string + InvitationsURL string + MsgContentType ContentType + ReaderURL string + TLSVerification bool + ThingsURL string + UsersURL string + type Connection struct + ChannelID string + ThingID string + type ContentType string + type Credentials struct + Identity string + Secret string + type Domain struct + Alias string + CreatedAt time.Time + CreatedBy string + ID string + Metadata Metadata + Name string + Permission string + Permissions []string + Status string + Tags []string + UpdatedAt time.Time + UpdatedBy string + type DomainsPage struct + Domains []Domain + type Group struct + Children []*Group + CreatedAt time.Time + Description string + DomainID string + ID string + Level int + Metadata Metadata + Name string + ParentID string + Path string + Permissions []string + Status string + UpdatedAt time.Time + type GroupsPage struct + Groups []Group + type HealthInfo struct + BuildTime string + Commit string + Description string + Status string + Version string + type Invitation struct + ConfirmedAt time.Time + CreatedAt time.Time + DomainID string + InvitedBy string + Relation string + Resend bool + Token string + UpdatedAt time.Time + UserID string + type InvitationPage struct + Invitations []Invitation + Limit uint64 + Offset uint64 + Total uint64 + type Login struct + DomainID string + Identity string + Secret string + type MembersPage struct + Members []User + type MembershipsPage struct + Memberships []Group + type MessagePageMetadata struct + Aggregation string + BoolValue *bool + Comparator string + DataValue string + From float64 + Interval string + Protocol string + Publisher string + StringValue string + Subtopic string + To float64 + Value float64 + type MessagesPage struct + Messages []senml.Message + type Metadata map[string]interface + type PageMetadata struct + Action string + Contact string + Direction string + DomainID string + Identity string + InvitedBy string + Level uint64 + Limit uint64 + ListPermissions string + Metadata Metadata + Name string + Object string + Offset uint64 + Order string + Owner string + OwnerID string + Permission string + Relation string + SharedBy string + State string + Status string + Subject string + Tag string + Topic string + Total uint64 + Type string + UserID string + Visibility string + type SDK interface + AcceptInvitation func(domainID, token string) (err error) + AddBootstrap func(cfg BootstrapConfig, token string) (string, errors.SDKError) + AddUserGroupToChannel func(channelID string, req UserGroupsRequest, token string) errors.SDKError + AddUserToChannel func(channelID string, req UsersRelationRequest, token string) errors.SDKError + AddUserToDomain func(domainID string, req UsersRelationRequest, token string) errors.SDKError + AddUserToGroup func(groupID string, req UsersRelationRequest, token string) errors.SDKError + Bootstrap func(externalID, externalKey string) (BootstrapConfig, errors.SDKError) + BootstrapSecure func(externalID, externalKey, cryptoKey string) (BootstrapConfig, errors.SDKError) + Bootstraps func(pm PageMetadata, token string) (BootstrapPage, errors.SDKError) + Channel func(id, token string) (Channel, errors.SDKError) + ChannelPermissions func(id, token string) (Channel, errors.SDKError) + Channels func(pm PageMetadata, token string) (ChannelsPage, errors.SDKError) + ChannelsByThing func(thingID string, pm PageMetadata, token string) (ChannelsPage, errors.SDKError) + Children func(id string, pm PageMetadata, token string) (GroupsPage, errors.SDKError) + Connect func(conns Connection, token string) errors.SDKError + ConnectThing func(thingID, chanID, token string) errors.SDKError + CreateChannel func(channel Channel, token string) (Channel, errors.SDKError) + CreateChannels func(channels []Channel, token string) ([]Channel, errors.SDKError) + CreateDomain func(d Domain, token string) (Domain, errors.SDKError) + CreateGroup func(group Group, token string) (Group, errors.SDKError) + CreateSubscription func(topic, contact, token string) (string, errors.SDKError) + CreateThing func(thing Thing, token string) (Thing, errors.SDKError) + CreateThings func(things []Thing, token string) ([]Thing, errors.SDKError) + CreateToken func(lt Login) (Token, errors.SDKError) + CreateUser func(user User, token string) (User, errors.SDKError) + DeleteChannel func(id, token string) errors.SDKError + DeleteGroup func(id, token string) errors.SDKError + DeleteInvitation func(userID, domainID, token string) (err error) + DeleteSubscription func(id, token string) errors.SDKError + DeleteThing func(id, token string) errors.SDKError + DisableChannel func(id, token string) (Channel, errors.SDKError) + DisableDomain func(domainID, token string) errors.SDKError + DisableGroup func(id, token string) (Group, errors.SDKError) + DisableThing func(id, token string) (Thing, errors.SDKError) + DisableUser func(id, token string) (User, errors.SDKError) + Disconnect func(connIDs Connection, token string) errors.SDKError + DisconnectThing func(thingID, chanID, token string) errors.SDKError + Domain func(domainID, token string) (Domain, errors.SDKError) + DomainPermissions func(domainID, token string) (Domain, errors.SDKError) + Domains func(pm PageMetadata, token string) (DomainsPage, errors.SDKError) + EnableChannel func(id, token string) (Channel, errors.SDKError) + EnableDomain func(domainID, token string) errors.SDKError + EnableGroup func(id, token string) (Group, errors.SDKError) + EnableThing func(id, token string) (Thing, errors.SDKError) + EnableUser func(id, token string) (User, errors.SDKError) + Group func(id, token string) (Group, errors.SDKError) + GroupPermissions func(id, token string) (Group, errors.SDKError) + Groups func(pm PageMetadata, token string) (GroupsPage, errors.SDKError) + Health func(service string) (HealthInfo, errors.SDKError) + IdentifyThing func(key string) (string, errors.SDKError) + Invitation func(userID, domainID, token string) (invitation Invitation, err error) + Invitations func(pm PageMetadata, token string) (invitations InvitationPage, err error) + IssueCert func(thingID, valid, token string) (Cert, errors.SDKError) + ListChannelUserGroups func(channelID string, pm PageMetadata, token string) (GroupsPage, errors.SDKError) + ListChannelUsers func(channelID string, pm PageMetadata, token string) (UsersPage, errors.SDKError) + ListDomainUsers func(domainID string, pm PageMetadata, token string) (UsersPage, errors.SDKError) + ListGroupChannels func(groupID string, pm PageMetadata, token string) (GroupsPage, errors.SDKError) + ListGroupUsers func(groupID string, pm PageMetadata, token string) (UsersPage, errors.SDKError) + ListSubscriptions func(pm PageMetadata, token string) (SubscriptionPage, errors.SDKError) + ListThingUsers func(thingID string, pm PageMetadata, token string) (UsersPage, errors.SDKError) + ListUserChannels func(userID string, pm PageMetadata, token string) (ChannelsPage, errors.SDKError) + ListUserDomains func(userID string, pm PageMetadata, token string) (DomainsPage, errors.SDKError) + ListUserGroups func(userID string, pm PageMetadata, token string) (GroupsPage, errors.SDKError) + ListUserThings func(userID string, pm PageMetadata, token string) (ThingsPage, errors.SDKError) + Parents func(id string, pm PageMetadata, token string) (GroupsPage, errors.SDKError) + ReadMessages func(pm MessagePageMetadata, chanID, token string) (MessagesPage, errors.SDKError) + RefreshToken func(lt Login, token string) (Token, errors.SDKError) + RemoveBootstrap func(id, token string) errors.SDKError + RemoveUserFromChannel func(channelID string, req UsersRelationRequest, token string) errors.SDKError + RemoveUserFromDomain func(domainID string, req UsersRelationRequest, token string) errors.SDKError + RemoveUserFromGroup func(groupID string, req UsersRelationRequest, token string) errors.SDKError + RemoveUserGroupFromChannel func(channelID string, req UserGroupsRequest, token string) errors.SDKError + ResetPassword func(password, confPass, token string) errors.SDKError + ResetPasswordRequest func(email string) errors.SDKError + RevokeCert func(thingID, token string) (time.Time, errors.SDKError) + SendInvitation func(invitation Invitation, token string) (err error) + SendMessage func(chanID, msg, key string) errors.SDKError + SetContentType func(ct ContentType) errors.SDKError + ShareThing func(thingID string, req UsersRelationRequest, token string) errors.SDKError + Thing func(id, token string) (Thing, errors.SDKError) + ThingPermissions func(id, token string) (Thing, errors.SDKError) + Things func(pm PageMetadata, token string) (ThingsPage, errors.SDKError) + ThingsByChannel func(chanID string, pm PageMetadata, token string) (ThingsPage, errors.SDKError) + UnshareThing func(thingID string, req UsersRelationRequest, token string) errors.SDKError + UpdateBootstrap func(cfg BootstrapConfig, token string) errors.SDKError + UpdateBootstrapCerts func(id string, clientCert, clientKey, ca string, token string) (BootstrapConfig, errors.SDKError) + UpdateBootstrapConnection func(id string, channels []string, token string) errors.SDKError + UpdateChannel func(channel Channel, token string) (Channel, errors.SDKError) + UpdateDomain func(d Domain, token string) (Domain, errors.SDKError) + UpdateGroup func(group Group, token string) (Group, errors.SDKError) + UpdatePassword func(oldPass, newPass, token string) (User, errors.SDKError) + UpdateThing func(thing Thing, token string) (Thing, errors.SDKError) + UpdateThingSecret func(id, secret, token string) (Thing, errors.SDKError) + UpdateThingTags func(thing Thing, token string) (Thing, errors.SDKError) + UpdateUser func(user User, token string) (User, errors.SDKError) + UpdateUserIdentity func(user User, token string) (User, errors.SDKError) + UpdateUserRole func(user User, token string) (User, errors.SDKError) + UpdateUserTags func(user User, token string) (User, errors.SDKError) + User func(id, token string) (User, errors.SDKError) + UserProfile func(token string) (User, errors.SDKError) + Users func(pm PageMetadata, token string) (UsersPage, errors.SDKError) + ViewBootstrap func(id, token string) (BootstrapConfig, errors.SDKError) + ViewCert func(certID, token string) (Cert, errors.SDKError) + ViewCertByThing func(thingID, token string) (CertSerials, errors.SDKError) + ViewSubscription func(id, token string) (Subscription, errors.SDKError) + Whitelist func(cfg BootstrapConfig, token string) errors.SDKError + func NewSDK(conf Config) SDK + type Subscription struct + Contact string + ID string + OwnerID string + Topic string + type SubscriptionPage struct + Subscriptions []Subscription + type Thing struct + CreatedAt time.Time + Credentials Credentials + DomainID string + ID string + Metadata map[string]interface{} + Name string + Permissions []string + Status string + Tags []string + UpdatedAt time.Time + type ThingsPage struct + Things []Thing + type Token struct + AccessToken string + AccessType string + RefreshToken string + type User struct + CreatedAt time.Time + Credentials Credentials + Domain string + ID string + Metadata Metadata + Name string + Role string + Status string + Tags []string + UpdatedAt time.Time + type UserGroupsRequest struct + UserGroupIDs []string + type UserPasswordReq struct + OldPassword string + Password string + type UsersPage struct + Users []User + type UsersRelationRequest struct + Relation string + UserIDs []string