Documentation ¶
Index ¶
- type EntityAPIKey
- type EntityCollaborator
- type Population
- func (p *Population) NewAPIKey(entityID *ttnpb.EntityIdentifiers, rights ...ttnpb.Right) *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 Store) 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) TestApplicationStoreCRUD(t *T)
- func (st *StoreTest) TestClientStoreCRUD(t *T)
- func (st *StoreTest) TestContactInfoStoreCRUD(t *T)
- func (st *StoreTest) TestDeletedEntities(t *T)
- func (st *StoreTest) TestEUIStore(t *T)
- func (st *StoreTest) TestEndDeviceStoreCRUD(t *T)
- func (st *StoreTest) TestEntitySearch(t *T)
- func (st *StoreTest) TestGatewayStoreCRUD(t *T)
- func (st *StoreTest) TestInvitationStore(t *T)
- func (st *StoreTest) TestLoginTokenStore(t *T)
- func (st *StoreTest) TestMembershipStoreCRUD(t *T)
- func (st *StoreTest) TestOAuthStore(t *T)
- func (st *StoreTest) TestOrganizationStoreCRUD(t *T)
- func (st *StoreTest) TestUserSessionStore(t *T)
- func (st *StoreTest) TestUserStoreCRUD(t *T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) *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) TestApplicationStoreCRUD ¶
func (st *StoreTest) TestApplicationStoreCRUD(t *T)
func (*StoreTest) TestClientStoreCRUD ¶
func (st *StoreTest) TestClientStoreCRUD(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) TestEndDeviceStoreCRUD ¶
func (st *StoreTest) TestEndDeviceStoreCRUD(t *T)
func (*StoreTest) TestEntitySearch ¶
func (st *StoreTest) TestEntitySearch(t *T)
func (*StoreTest) TestGatewayStoreCRUD ¶
func (st *StoreTest) TestGatewayStoreCRUD(t *T)
func (*StoreTest) TestInvitationStore ¶
func (st *StoreTest) TestInvitationStore(t *T)
func (*StoreTest) TestLoginTokenStore ¶
func (st *StoreTest) TestLoginTokenStore(t *T)
func (*StoreTest) TestMembershipStoreCRUD ¶
func (st *StoreTest) TestMembershipStoreCRUD(t *T)
func (*StoreTest) TestOAuthStore ¶
func (st *StoreTest) TestOAuthStore(t *T)
func (*StoreTest) TestOrganizationStoreCRUD ¶
func (st *StoreTest) TestOrganizationStoreCRUD(t *T)
func (*StoreTest) TestUserSessionStore ¶
func (st *StoreTest) TestUserSessionStore(t *T)
func (*StoreTest) TestUserStoreCRUD ¶
func (st *StoreTest) TestUserStoreCRUD(t *T)
Source Files ¶
- api_key_store.go
- application_store.go
- client_store.go
- contact_info_store.go
- deleted_entities.go
- end_device_store.go
- entity_search.go
- eui_store.go
- gateway_store.go
- invitation_store.go
- login_token_store.go
- membership_store.go
- oauth_store.go
- organization_store.go
- population.go
- storetest.go
- user_session_store.go
- user_store.go
- utils.go