mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
68f551f81d
* feat(invitations): Implement invitations outline This commit adds the necessary data structures and methods for managing invitations to join a domain. It includes structs for invitations, pages of invitations, and pages of invitations with additional metadata. Additionally, error variables for missing and invalid relations are defined. The commit also introduces methods for sending, viewing, listing, accepting, and deleting invitations. In addition, it includes functions for creating, retrieving, updating, and deleting invitations in a repository. Furthermore, a function is added to check the validity of a relation, returning an error if it does not match specific values. Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> * docs(invitations): add godocs * test: Add tests for MarshalJSON and CheckRelation Add tests to ensure the MarshalJSON function of the InvitationPage struct correctly marshals the JSON representation. Also, add tests for the CheckRelation function to verify its behavior in different scenarios. The tests use a loop and the assert.Equal function to compare expected and actual errors. Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> * feat(invitations): add withToken parameter to RetrieveAll method This commit adds a new parameter "withToken" to the RetrieveAll method in the invitations package. This parameter allows the caller to specify whether they want to include the token in the returned invitation list. Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> * docs(invitations): Add Base README --------- Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
8 lines
209 B
Go
8 lines
209 B
Go
// Copyright (c) Abstract Machines
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Package invitations provides the API to manage invitations.
|
|
//
|
|
// An invitation is a request to join a domain.
|
|
package invitations
|