This section is empty.


This section is empty.


This section is empty.


type GormOrganizationStore

type GormOrganizationStore struct {
	// contains filtered or unexported fields

    GormOrganizationStore implements organization membership persistence using Gorm.

    func NewGormOrganizationStore

    func NewGormOrganizationStore(db *gorm.DB) GormOrganizationStore

      NewGormOrganizationStore returns a new GormOrganizationStore.

      func (GormOrganizationStore) ApplyUserMembership

      func (g GormOrganizationStore) ApplyUserMembership(ctx context.Context, organizationID uint, userID uint, role string) error

        ApplyUserMembership ensures that a user is a member of an organization with the necessary role.

        func (GormOrganizationStore) EnsureOrganizationExists

        func (g GormOrganizationStore) EnsureOrganizationExists(ctx context.Context, name string, provider string) (bool, uint, error)

          EnsureOrganizationExists ensures that an organization exists.

          func (GormOrganizationStore) FindUserRole

          func (g GormOrganizationStore) FindUserRole(ctx context.Context, orgID uint, userID uint) (string, bool, error)

            FindUserRole returns the user's role in a given organization. Returns false as the second parameter if the user is not a member of the organization.

            func (GormOrganizationStore) GetOrganizationMembershipsOf

            func (g GormOrganizationStore) GetOrganizationMembershipsOf(ctx context.Context, userID uint) ([]auth.UserOrganization, error)

              GetOrganizationMembershipsOf returns the list of organization memberships for a user.

              func (GormOrganizationStore) RemoveUserFromOrganization

              func (g GormOrganizationStore) RemoveUserFromOrganization(ctx context.Context, organizationID uint, userID uint) error

                RemoveUserFromOrganization removes a user from an organization.