Documentation ¶
Index ¶
- Constants
- Variables
- func AssertIntegrity(ctx context.Context) error
- func CheckAccess(ctx context.Context, identityID uint, ...) error
- func CreateGuest(ctx context.Context, namespace string) (*domain.User, error)
- func GetIdentity(ctx context.Context, identityId uint) (*domain.Identity, error)
- func GetNamespace(ctx context.Context, namespace string) (*domain.Namespace, error)
- func GetRole(ctx context.Context, roleId uint) (*domain.Role, error)
- func GetRoleByName(ctx context.Context, namespace, name string) (*domain.Role, error)
- func GetRule(ctx context.Context, ruleId uint) (*domain.Rule, error)
- func GetSession(ctx context.Context, sessionID uint) (*domain.Session, error)
- func GetSoidConfig(ctx context.Context) (*domain.SOIDConfig, error)
- func GetUser(ctx context.Context, userId uint) (*domain.User, error)
- func GetUserFromIdentity(ctx context.Context, identityId uint) (*domain.User, error)
- func GetUserFromSession(ctx context.Context, sessionID uint) (*domain.User, error)
- func InitializeSoid(ctx context.Context, configFile string) error
- func Login(ctx context.Context, namespace, username, password string) (*domain.Session, error)
- func Logout(ctx context.Context, sessionID uint) error
- func NewSession(ctx context.Context, identityID uint, namespace string) (*domain.Session, error)
- func RecreateRoot(ctx context.Context, rootUsername, rootPassword string) error
- func RemoveIdentity(ctx context.Context, identityID uint) error
- func RemoveSession(ctx context.Context, sessionID uint) error
- type ListIdentitiesResult
- type ListRolesResult
- type ListRulesResult
- type ListSessionsResult
- type ListUsersResult
Constants ¶
View Source
const (
DefaultNamespace = "soid"
)
Variables ¶
View Source
var (
ErrNotAllowed = errors.New("operation not permitted")
)
Functions ¶
func AssertIntegrity ¶
func CheckAccess ¶
func CheckAccess(ctx context.Context, identityID uint, namespace, name, operation, objectType string, instances []domain.Metadata) error
CheckAccess returns nil if the operation is allowed, otherwis an error is returned
func GetNamespace ¶
Exists validates that the namespace exists
func GetRoleByName ¶
func GetSoidConfig ¶
func GetSoidConfig(ctx context.Context) (*domain.SOIDConfig, error)
func GetUserFromIdentity ¶
func GetUserFromSession ¶
func NewSession ¶
func RecreateRoot ¶
RecreateRoot removes the old rootID and recreates it with a new username/password and makes sure there is appropriate rules/roles for the root
Types ¶
type ListIdentitiesResult ¶
type ListRolesResult ¶
type ListRulesResult ¶
type ListSessionsResult ¶
type ListUsersResult ¶
Click to show internal directories.
Click to hide internal directories.