Documentation ¶
Overview ¶
Package resources provides ready-to-use SQL schemes and DAOs for attaching resource policies to any data
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModifyLogin ¶
func ModifyLogin(ctx context.Context, dao DAO, req *service.ModifyLoginRequest) (*service.ModifyLoginResponse, error)
Types ¶
type DAO ¶
type DAO interface { Migrate(ctx context.Context) error AddPolicy(ctx context.Context, resourceId string, policy *service.ResourcePolicy) error AddPolicies(ctx context.Context, update bool, resourceId string, rules []*service.ResourcePolicy) error GetPoliciesForResource(ctx context.Context, resourceId string) ([]*service.ResourcePolicy, error) GetPoliciesForSubject(ctx context.Context, subject string) ([]*service.ResourcePolicy, error) ReplacePoliciesSubject(ctx context.Context, oldSubject, newSubject string) (int, error) DeletePoliciesForResource(ctx context.Context, resourceId string) error DeletePoliciesForResourceAndAction(ctx context.Context, resourceId string, action service.ResourcePolicyAction) error DeletePoliciesBySubject(ctx context.Context, subject string) error service.Converter[*gorm.DB] }
DAO interface
type QueryBuilder ¶
func PrepareQueryBuilder ¶
PrepareQueryBuilder instantiates a QueryBuilder with a proper LeftIdentifier
Click to show internal directories.
Click to hide internal directories.