Documentation ¶
Index ¶
- func CreateSchema(db *sql.DB, schemaName string) error
- func DropSchema(db *sql.DB, schemaName string) error
- func GetDSN(defaultDB string) *url.URL
- func GetSchemaDSN(base *url.URL, schemaName string) *url.URL
- type EntityAPIKey
- type EntityCollaborator
- type Population
- func (p *Population) NewAPIKey(entityID *ttnpb.EntityIdentifiers, rights ...ttnpb.Right) (original, stored *ttnpb.APIKey)
- func (p *Population) NewApplication(owner *ttnpb.OrganizationOrUserIdentifiers) *ttnpb.Application
- func (p *Population) NewClient(owner *ttnpb.OrganizationOrUserIdentifiers) *ttnpb.Client
- func (p *Population) NewEndDevice(application *ttnpb.ApplicationIdentifiers) *ttnpb.EndDevice
- func (p *Population) NewGateway(owner *ttnpb.OrganizationOrUserIdentifiers) *ttnpb.Gateway
- func (p *Population) NewMembership(memberID *ttnpb.OrganizationOrUserIdentifiers, ...)
- func (p *Population) NewOrganization(owner *ttnpb.OrganizationOrUserIdentifiers) *ttnpb.Organization
- func (p *Population) NewUser() *ttnpb.User
- func (p *Population) NewUserSession(user *ttnpb.UserIdentifiers) *ttnpb.UserSession
- func (p *Population) Populate(ctx context.Context, st any) error
- type Store
- type StoreTest
- func (s *StoreTest) DestroyDB(t *testing.T, assertClean bool, exceptions ...string)
- func (s *StoreTest) PrepareDB(t *testing.T) Store
- func (st *StoreTest) TestAPIKeyStoreCRUD(t *T)
- func (st *StoreTest) TestAPIKeyStorePagination(t *T)
- func (st *StoreTest) TestApplicationStoreCRUD(t *T)
- func (st *StoreTest) TestApplicationStorePagination(t *T)
- func (st *StoreTest) TestBasicBookmarkOperations(t *testing.T)
- func (st *StoreTest) TestBookmarksEntityAndUserOperations(t *testing.T)
- func (st *StoreTest) TestClientStoreCRUD(t *T)
- func (st *StoreTest) TestClientStorePagination(t *T)
- func (st *StoreTest) TestContactInfoStoreCRUD(t *T)
- func (st *StoreTest) TestDeletedEntities(t *T)
- func (st *StoreTest) TestEUIStore(t *T)
- func (st *StoreTest) TestEmailValidationStore(t *T)
- func (st *StoreTest) TestEndDeviceBatchOperations(t *T)
- func (st *StoreTest) TestEndDeviceBatchUpdate(t *T)
- func (st *StoreTest) TestEndDeviceCAC(t *T)
- func (st *StoreTest) TestEndDeviceStoreCRUD(t *T)
- func (st *StoreTest) TestEndDeviceStorePagination(t *T)
- func (st *StoreTest) TestEntitySearch(t *T)
- func (st *StoreTest) TestEntitySearchPagination(t *T)
- func (st *StoreTest) TestGatewayBatchOperations(t *T)
- func (st *StoreTest) TestGatewayStoreCRUD(t *T)
- func (st *StoreTest) TestGatewayStorePagination(t *T)
- func (st *StoreTest) TestInvitationStore(t *T)
- func (st *StoreTest) TestInvitationStorePagination(t *T)
- func (st *StoreTest) TestLoginTokenStore(t *T)
- func (st *StoreTest) TestMembershipStoreCRUD(t *T)
- func (st *StoreTest) TestMembershipStorePagination(t *T)
- func (st *StoreTest) TestNotificationStore(t *T)
- func (st *StoreTest) TestOAuthStore(t *T)
- func (st *StoreTest) TestOAuthStorePagination(t *T)
- func (st *StoreTest) TestOrganizationStoreCRUD(t *T)
- func (st *StoreTest) TestOrganizationStorePagination(t *T)
- func (st *StoreTest) TestUserSessionStore(t *T)
- func (st *StoreTest) TestUserSessionStorePagination(t *T)
- func (st *StoreTest) TestUserStoreCRUD(t *T)
- func (st *StoreTest) TestUserStorePagination(t *T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EntityAPIKey ¶
type EntityAPIKey struct { EntityIdentifiers *ttnpb.EntityIdentifiers APIKey *ttnpb.APIKey }
EntityAPIKey is an API key for an entity.
type EntityCollaborator ¶
type EntityCollaborator struct { EntityIdentifiers *ttnpb.EntityIdentifiers Collaborator *ttnpb.Collaborator }
EntityCollaborator is a collaborator on an entity.
type Population ¶
type Population struct { Applications []*ttnpb.Application Clients []*ttnpb.Client EndDevices []*ttnpb.EndDevice Gateways []*ttnpb.Gateway Organizations []*ttnpb.Organization Users []*ttnpb.User UserSessions []*ttnpb.UserSession APIKeys []*EntityAPIKey Memberships []*EntityCollaborator }
Population is a collection of store entities.
func (*Population) NewAPIKey ¶
func (p *Population) NewAPIKey(entityID *ttnpb.EntityIdentifiers, rights ...ttnpb.Right) (original, stored *ttnpb.APIKey)
NewAPIKey adds a new API key to the population and returns it. The returned API key can not be modified and will not have its CreatedAt/UpdatedAt fields populated.
func (*Population) NewApplication ¶
func (p *Population) NewApplication(owner *ttnpb.OrganizationOrUserIdentifiers) *ttnpb.Application
NewApplication adds a new application to the population and returns it. The returned application can be modified until Population.Populate is called.
func (*Population) NewClient ¶
func (p *Population) NewClient(owner *ttnpb.OrganizationOrUserIdentifiers) *ttnpb.Client
NewClient adds a new client to the population and returns it. The returned client can be modified until Population.Populate is called.
func (*Population) NewEndDevice ¶
func (p *Population) NewEndDevice(application *ttnpb.ApplicationIdentifiers) *ttnpb.EndDevice
NewEndDevice adds a new end device to the population and returns it. The returned end device can be modified until Population.Populate is called.
func (*Population) NewGateway ¶
func (p *Population) NewGateway(owner *ttnpb.OrganizationOrUserIdentifiers) *ttnpb.Gateway
NewGateway adds a new gateway to the population and returns it. The returned gateway can be modified until Population.Populate is called.
func (*Population) NewMembership ¶
func (p *Population) NewMembership(memberID *ttnpb.OrganizationOrUserIdentifiers, entityID *ttnpb.EntityIdentifiers, rights ...ttnpb.Right)
NewMembership adds a new membership to the population.
func (*Population) NewOrganization ¶
func (p *Population) NewOrganization(owner *ttnpb.OrganizationOrUserIdentifiers) *ttnpb.Organization
NewOrganization adds a new organization to the population and returns it. The returned organization can be modified until Population.Populate is called.
func (*Population) NewUser ¶
func (p *Population) NewUser() *ttnpb.User
NewUser adds a new user to the population and returns it. The returned user can be modified until Population.Populate is called.
func (*Population) NewUserSession ¶
func (p *Population) NewUserSession(user *ttnpb.UserIdentifiers) *ttnpb.UserSession
NewUserSession adds a new user session to the population and returns it. The returned user session can not be modified and will not have its CreatedAt/UpdatedAt fields populated.
type StoreTest ¶
type StoreTest struct {
// contains filtered or unexported fields
}
func (*StoreTest) TestAPIKeyStoreCRUD ¶
func (st *StoreTest) TestAPIKeyStoreCRUD(t *T)
func (*StoreTest) TestAPIKeyStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestAPIKeyStorePagination(t *T)
func (*StoreTest) TestApplicationStoreCRUD ¶
func (st *StoreTest) TestApplicationStoreCRUD(t *T)
func (*StoreTest) TestApplicationStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestApplicationStorePagination(t *T)
func (*StoreTest) TestBasicBookmarkOperations ¶ added in v3.30.0
TestBasicBookmarkOperations tests the UserBookmarkStore interface.
func (*StoreTest) TestBookmarksEntityAndUserOperations ¶ added in v3.30.0
TestBookmarksEntityAndUserOperations tests the UserBookmarkStore interface's entity and user operations.
func (*StoreTest) TestClientStoreCRUD ¶
func (st *StoreTest) TestClientStoreCRUD(t *T)
func (*StoreTest) TestClientStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestClientStorePagination(t *T)
func (*StoreTest) TestContactInfoStoreCRUD ¶
func (st *StoreTest) TestContactInfoStoreCRUD(t *T)
func (*StoreTest) TestDeletedEntities ¶
func (st *StoreTest) TestDeletedEntities(t *T)
func (*StoreTest) TestEUIStore ¶
func (st *StoreTest) TestEUIStore(t *T)
func (*StoreTest) TestEmailValidationStore ¶ added in v3.29.0
func (st *StoreTest) TestEmailValidationStore(t *T)
TestEmailValidationStore tests the email validation store operations.
func (*StoreTest) TestEndDeviceBatchOperations ¶ added in v3.27.0
func (st *StoreTest) TestEndDeviceBatchOperations(t *T)
TestEndDeviceBatchOperations tests end device batch operations.
func (*StoreTest) TestEndDeviceBatchUpdate ¶ added in v3.19.0
func (st *StoreTest) TestEndDeviceBatchUpdate(t *T)
func (*StoreTest) TestEndDeviceCAC ¶ added in v3.21.2
func (st *StoreTest) TestEndDeviceCAC(t *T)
func (*StoreTest) TestEndDeviceStoreCRUD ¶
func (st *StoreTest) TestEndDeviceStoreCRUD(t *T)
func (*StoreTest) TestEndDeviceStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestEndDeviceStorePagination(t *T)
func (*StoreTest) TestEntitySearch ¶
func (st *StoreTest) TestEntitySearch(t *T)
func (*StoreTest) TestEntitySearchPagination ¶ added in v3.18.0
func (st *StoreTest) TestEntitySearchPagination(t *T)
func (*StoreTest) TestGatewayBatchOperations ¶ added in v3.28.0
func (st *StoreTest) TestGatewayBatchOperations(t *T)
TestGatewayBatchOperations tests gateway batch operations.
func (*StoreTest) TestGatewayStoreCRUD ¶
func (st *StoreTest) TestGatewayStoreCRUD(t *T)
func (*StoreTest) TestGatewayStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestGatewayStorePagination(t *T)
func (*StoreTest) TestInvitationStore ¶
func (st *StoreTest) TestInvitationStore(t *T)
func (*StoreTest) TestInvitationStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestInvitationStorePagination(t *T)
func (*StoreTest) TestLoginTokenStore ¶
func (st *StoreTest) TestLoginTokenStore(t *T)
func (*StoreTest) TestMembershipStoreCRUD ¶
func (st *StoreTest) TestMembershipStoreCRUD(t *T)
func (*StoreTest) TestMembershipStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestMembershipStorePagination(t *T)
func (*StoreTest) TestNotificationStore ¶ added in v3.19.0
func (st *StoreTest) TestNotificationStore(t *T)
func (*StoreTest) TestOAuthStore ¶
func (st *StoreTest) TestOAuthStore(t *T)
func (*StoreTest) TestOAuthStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestOAuthStorePagination(t *T)
func (*StoreTest) TestOrganizationStoreCRUD ¶
func (st *StoreTest) TestOrganizationStoreCRUD(t *T)
func (*StoreTest) TestOrganizationStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestOrganizationStorePagination(t *T)
func (*StoreTest) TestUserSessionStore ¶
func (st *StoreTest) TestUserSessionStore(t *T)
func (*StoreTest) TestUserSessionStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestUserSessionStorePagination(t *T)
func (*StoreTest) TestUserStoreCRUD ¶
func (st *StoreTest) TestUserStoreCRUD(t *T)
func (*StoreTest) TestUserStorePagination ¶ added in v3.18.0
func (st *StoreTest) TestUserStorePagination(t *T)
Source Files ¶
- api_key_store.go
- application_store.go
- client_store.go
- contact_info_store.go
- deleted_entities.go
- email_validations.go
- end_device_store.go
- entity_search.go
- eui_store.go
- gateway_store.go
- invitation_store.go
- login_token_store.go
- membership_store.go
- notification_store.go
- oauth_store.go
- organization_store.go
- population.go
- storetest.go
- user_bookmarks_store.go
- user_session_store.go
- user_store.go
- utils.go