2020-05-13 12:22:29 +00:00
|
|
|
package repository
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2020-08-26 07:56:23 +00:00
|
|
|
iam_model "github.com/caos/zitadel/internal/iam/model"
|
2020-05-13 12:22:29 +00:00
|
|
|
|
|
|
|
org_model "github.com/caos/zitadel/internal/org/model"
|
|
|
|
)
|
|
|
|
|
|
|
|
type OrgRepository interface {
|
2020-06-23 05:06:07 +00:00
|
|
|
OrgByID(ctx context.Context, id string) (*org_model.OrgView, error)
|
|
|
|
OrgByDomainGlobal(ctx context.Context, domain string) (*org_model.OrgView, error)
|
2020-08-06 12:38:19 +00:00
|
|
|
CreateOrg(ctx context.Context, name string) (*org_model.Org, error)
|
2020-05-13 12:22:29 +00:00
|
|
|
UpdateOrg(ctx context.Context, org *org_model.Org) (*org_model.Org, error)
|
|
|
|
DeactivateOrg(ctx context.Context, id string) (*org_model.Org, error)
|
|
|
|
ReactivateOrg(ctx context.Context, id string) (*org_model.Org, error)
|
2020-06-25 09:25:38 +00:00
|
|
|
OrgChanges(ctx context.Context, id string, lastSequence uint64, limit uint64, sortAscending bool) (*org_model.OrgChanges, error)
|
2020-05-13 12:22:29 +00:00
|
|
|
|
2020-06-16 09:40:18 +00:00
|
|
|
SearchMyOrgDomains(ctx context.Context, request *org_model.OrgDomainSearchRequest) (*org_model.OrgDomainSearchResponse, error)
|
|
|
|
AddMyOrgDomain(ctx context.Context, domain *org_model.OrgDomain) (*org_model.OrgDomain, error)
|
2020-08-06 13:03:03 +00:00
|
|
|
GenerateMyOrgDomainValidation(ctx context.Context, domain *org_model.OrgDomain) (string, string, error)
|
|
|
|
ValidateMyOrgDomain(ctx context.Context, domain *org_model.OrgDomain) error
|
|
|
|
SetMyPrimaryOrgDomain(ctx context.Context, domain *org_model.OrgDomain) error
|
2020-06-16 09:40:18 +00:00
|
|
|
RemoveMyOrgDomain(ctx context.Context, domain string) error
|
|
|
|
|
2020-06-10 08:47:50 +00:00
|
|
|
SearchMyOrgMembers(ctx context.Context, request *org_model.OrgMemberSearchRequest) (*org_model.OrgMemberSearchResponse, error)
|
|
|
|
AddMyOrgMember(ctx context.Context, member *org_model.OrgMember) (*org_model.OrgMember, error)
|
|
|
|
ChangeMyOrgMember(ctx context.Context, member *org_model.OrgMember) (*org_model.OrgMember, error)
|
|
|
|
RemoveMyOrgMember(ctx context.Context, userID string) error
|
2020-05-26 14:46:16 +00:00
|
|
|
|
|
|
|
GetOrgMemberRoles() []string
|
2020-06-19 05:27:16 +00:00
|
|
|
|
2020-08-26 07:56:23 +00:00
|
|
|
GetMyOrgIamPolicy(ctx context.Context) (*org_model.OrgIAMPolicy, error)
|
|
|
|
|
|
|
|
SearchIDPConfigs(ctx context.Context, request *iam_model.IDPConfigSearchRequest) (*iam_model.IDPConfigSearchResponse, error)
|
|
|
|
IDPConfigByID(ctx context.Context, id string) (*iam_model.IDPConfigView, error)
|
|
|
|
AddOIDCIDPConfig(ctx context.Context, idp *iam_model.IDPConfig) (*iam_model.IDPConfig, error)
|
|
|
|
ChangeIDPConfig(ctx context.Context, idp *iam_model.IDPConfig) (*iam_model.IDPConfig, error)
|
|
|
|
DeactivateIDPConfig(ctx context.Context, idpConfigID string) (*iam_model.IDPConfig, error)
|
|
|
|
ReactivateIDPConfig(ctx context.Context, idpConfigID string) (*iam_model.IDPConfig, error)
|
|
|
|
RemoveIDPConfig(ctx context.Context, idpConfigID string) error
|
|
|
|
ChangeOIDCIDPConfig(ctx context.Context, oidcConfig *iam_model.OIDCIDPConfig) (*iam_model.OIDCIDPConfig, error)
|
|
|
|
|
|
|
|
GetLoginPolicy(ctx context.Context) (*iam_model.LoginPolicyView, error)
|
|
|
|
AddLoginPolicy(ctx context.Context, policy *iam_model.LoginPolicy) (*iam_model.LoginPolicy, error)
|
|
|
|
ChangeLoginPolicy(ctx context.Context, policy *iam_model.LoginPolicy) (*iam_model.LoginPolicy, error)
|
|
|
|
RemoveLoginPolicy(ctx context.Context) error
|
|
|
|
SearchIDPProviders(ctx context.Context, request *iam_model.IDPProviderSearchRequest) (*iam_model.IDPProviderSearchResponse, error)
|
|
|
|
AddIDPProviderToLoginPolicy(ctx context.Context, provider *iam_model.IDPProvider) (*iam_model.IDPProvider, error)
|
|
|
|
RemoveIDPProviderFromLoginPolicy(ctx context.Context, provider *iam_model.IDPProvider) error
|
2020-05-13 12:22:29 +00:00
|
|
|
}
|