fix: add requests

This commit is contained in:
Fabiennne 2020-03-24 10:14:39 +01:00
parent 46c3289ee3
commit c20dd3cb3f
26 changed files with 869 additions and 7 deletions

View File

@ -6,17 +6,17 @@ import (
)
func (s *Server) GetOrgByID(ctx context.Context, orgID *OrgID) (_ *Org, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
return nil, errors.ThrowUnimplemented(nil, "GRPC-mvn3R", "Not implemented")
}
func (s *Server) SearchOrgs(ctx context.Context, request *OrgSearchRequest) (_ *OrgSearchResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
return nil, errors.ThrowUnimplemented(nil, "GRPC-Po9Hd", "Not implemented")
}
func (s *Server) IsOrgUnique(ctx context.Context, request *UniqueOrgRequest) (org *UniqueOrgResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
return nil, errors.ThrowUnimplemented(nil, "GRPC-0p6Fw", "Not implemented")
}
func (s *Server) SetUpOrg(ctx context.Context, orgSetUp *OrgSetUpRequest) (_ *OrgSetUpResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
return nil, errors.ThrowUnimplemented(nil, "GRPC-hdj5D", "Not implemented")
}

View File

@ -12,9 +12,9 @@ func (s *Server) Healthz(_ context.Context, e *empty.Empty) (*empty.Empty, error
}
func (s *Server) Ready(ctx context.Context, e *empty.Empty) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
return nil, errors.ThrowUnimplemented(nil, "GRPC-bw3vR", "Not implemented")
}
func (s *Server) Validate(ctx context.Context, _ *empty.Empty) (*pb_struct.Struct, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
return nil, errors.ThrowUnimplemented(nil, "GRPC-98Gse", "Not implemented")
}

View File

@ -1,7 +1,7 @@
package grpc
import (
grpc "google.golang.org/grpc"
"google.golang.org/grpc"
)
var _ AdminServiceServer = (*Server)(nil)

View File

@ -0,0 +1,18 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
)
func (s *Server) GetApplicationByID(ctx context.Context, request *ApplicationID) (*Application, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-Rfh8e", "Not implemented")
}
func (s *Server) SearchApplications(ctx context.Context, appSearch *ApplicationSearchRequest) (*ApplicationSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ju8Rd", "Not implemented")
}
func (s *Server) AuthorizeApplication(ctx context.Context, auth *ApplicationAuthorizeRequest) (*Application, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-lo8ws", "Not implemented")
}

View File

@ -0,0 +1,34 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
)
func (s *Server) CreateAuthSession(ctx context.Context, request *AuthSessionCreation) (_ *AuthSessionResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dh3Rt", "Not implemented")
}
func (s *Server) GetAuthSession(ctx context.Context, id *AuthSessionID) (_ *AuthSessionResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dk56g", "Not implemented")
}
func (s *Server) SelectUser(ctx context.Context, request *SelectUserRequest) (_ *AuthSessionResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dl5gs", "Not implemented")
}
func (s *Server) VerifyUser(ctx context.Context, request *VerifyUserRequest) (_ *AuthSessionResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-39dGs", "Not implemented")
}
func (s *Server) VerifyPassword(ctx context.Context, password *VerifyPasswordRequest) (_ *AuthSessionResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-tu9j2", "Not implemented")
}
func (s *Server) VerifyMfa(ctx context.Context, mfa *VerifyMfaRequest) (_ *AuthSessionResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-oi9GB", "Not implemented")
}
func (s *Server) GetAuthSessionByTokenID(ctx context.Context, id *TokenID) (_ *AuthSessionView, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dk56z", "Not implemented")
}

View File

@ -0,0 +1,19 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) SearchGrant(ctx context.Context, grantSearch *GrantSearchRequest) (*GrantSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mcn5z", "Not implemented")
}
func (s *Server) SearchMyProjectOrgs(ctx context.Context, request *MyProjectOrgSearchRequest) (*MyProjectOrgSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-8kdRf", "Not implemented")
}
func (s *Server) IsIamAdmin(ctx context.Context, _ *empty.Empty) (*IsAdminResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-9odFv", "Not implemented")
}

View File

@ -0,0 +1,50 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) GetMyZitadelPermissions(ctx context.Context, _ *empty.Empty) (*MyPermissions, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-or67G", "Not implemented")
//ctxData := auth.GetCtxData(ctx)
//
//grants, err := s.processor.ResolveGrants(ctx, ctxData.UserID, ctxData.OrgID)
//if err != nil {
// return nil, err
//}
//
//permissions := &MyPermissions{Permissions: []string{}}
//
//for _, grant := range grants {
// for _, role := range grant.Roles {
// roleName, ctxID := auth.SplitPermission(role)
// for _, mapping := range s.authConf.RolePermissionMappings {
// if mapping.Role == roleName {
// permissions.appendPermissions(ctxID, mapping.Permissions...)
// }
// }
// }
//}
//
//return permissions, nil
}
func (p *MyPermissions) appendPermissions(ctxID string, permissions ...string) {
for _, permission := range permissions {
p.appendPermission(ctxID, permission)
}
}
func (p *MyPermissions) appendPermission(ctxID, permission string) {
if ctxID != "" {
permission = permission + ":" + ctxID
}
for _, existingPermission := range p.Permissions {
if existingPermission == permission {
return
}
}
p.Permissions = append(p.Permissions, permission)
}

View File

@ -0,0 +1,20 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
pb_struct "github.com/golang/protobuf/ptypes/struct"
)
func (s *Server) Healthz(_ context.Context, e *empty.Empty) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-bst5W", "Not implemented")
}
func (s *Server) Ready(ctx context.Context, e *empty.Empty) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-or0vW", "Not implemented")
}
func (s *Server) Validate(ctx context.Context, _ *empty.Empty) (*pb_struct.Struct, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-lo6Eg", "Not implemented")
}

View File

@ -0,0 +1,34 @@
package grpc
import (
"google.golang.org/grpc"
)
var _ AuthServiceServer = (*Server)(nil)
type Config struct {
Port string
SearchLimit int
}
type Server struct {
port string
searchLimit int
}
func StartServer(conf Config) *Server {
return &Server{
port: conf.Port,
searchLimit: conf.SearchLimit,
}
}
func (s *Server) GRPCPort() string {
return s.port
}
func (s *Server) GRPCServer() (*grpc.Server, error) {
gs := grpc.NewServer()
RegisterAuthServiceServer(gs, s)
return gs, nil
}

View File

@ -0,0 +1,10 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
)
func (s *Server) CreateToken(ctx context.Context, request *CreateTokenRequest) (_ *Token, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-86dG3", "Not implemented")
}

122
pkg/auth/api/grpc/user.go Normal file
View File

@ -0,0 +1,122 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) GetUserByID(ctx context.Context, request *UserID) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-fj74G", "Not implemented")
}
func (s *Server) IsUserUnique(ctx context.Context, request *UniqueUserRequest) (*UniqueUserResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dke9f", "Not implemented")
}
func (s *Server) GetMyUserProfile(ctx context.Context, _ *empty.Empty) (*UserProfile, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-fis93", "Not implemented")
}
func (s *Server) GetMyUserEmail(ctx context.Context, _ *empty.Empty) (*UserEmail, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-93j5d", "Not implemented")
}
func (s *Server) GetMyUserPhone(ctx context.Context, _ *empty.Empty) (*UserPhone, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-Hj75G", "Not implemented")
}
func (s *Server) GetMyUserAddress(ctx context.Context, _ *empty.Empty) (*UserAddress, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-21jd4", "Not implemented")
}
func (s *Server) GetMyMfas(ctx context.Context, _ *empty.Empty) (*MultiFactors, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-vkl9i", "Not implemented")
}
func (s *Server) RegisterUser(ctx context.Context, request *RegisterUserRequest) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-03idx", "Not implemented")
}
func (s *Server) RegisterUserWithExternal(ctx context.Context, request *RegisterUserExternalIDPRequest) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dlwpd", "Not implemented")
}
func (s *Server) UpdateMyUserProfile(ctx context.Context, request *UpdateUserProfileRequest) (*UserProfile, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dlep3", "Not implemented")
}
func (s *Server) ChangeMyUserEmail(ctx context.Context, request *UpdateUserEmailRequest) (*UserEmail, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-lme45", "Not implemented")
}
func (s *Server) VerifyMyUserEmail(ctx context.Context, request *VerifyMyUserEmailRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-poru7", "Not implemented")
}
func (s *Server) VerifyUserEmail(ctx context.Context, request *VerifyUserEmailRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dlep3", "Not implemented")
}
func (s *Server) ResendMyEmailVerificationMail(ctx context.Context, _ *empty.Empty) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dh69i", "Not implemented")
}
func (s *Server) ResendEmailVerificationMail(ctx context.Context, id *UserID) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mAq23", "Not implemented")
}
func (s *Server) ChangeMyUserPhone(ctx context.Context, request *UpdateUserPhoneRequest) (*UserPhone, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dk45g", "Not implemented")
}
func (s *Server) VerifyMyUserPhone(ctx context.Context, request *VerifyUserPhoneRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ol6gE", "Not implemented")
}
func (s *Server) ResendMyPhoneVerificationCode(ctx context.Context, _ *empty.Empty) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-Wk8rf", "Not implemented")
}
func (s *Server) UpdateMyUserAddress(ctx context.Context, request *UpdateUserAddressRequest) (*UserAddress, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-cmt7F", "Not implemented")
}
func (s *Server) SetMyPassword(ctx context.Context, request *PasswordRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-pl9c2", "Not implemented")
}
func (s *Server) RequestPasswordReset(ctx context.Context, request *ResetPasswordRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-xm5hW", "Not implemented")
}
func (s *Server) PasswordReset(ctx context.Context, request *ResetPassword) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mce5W", "Not implemented")
}
func (s *Server) ChangeMyPassword(ctx context.Context, request *PasswordChange) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dlo6G", "Not implemented")
}
func (s *Server) AddMfaOTP(ctx context.Context, _ *empty.Empty) (_ *MfaOtpResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-al35G", "Not implemented")
}
func (s *Server) VerifyMfaOTP(ctx context.Context, request *VerifyMfaOtp) (_ *MfaOtpResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-kgjZ7", "Not implemented")
}
func (s *Server) RemoveMfaOTP(ctx context.Context, _ *empty.Empty) (_ *empty.Empty, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-9k46d", "Not implemented")
}
func (s *Server) SkipMfaInit(ctx context.Context, request *SkipMfaInitRequest) (_ *empty.Empty, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dl3i5", "Not implemented")
}
func (s *Server) VerifyUserInit(ctx context.Context, request *VerifyUserInitRequest) (_ *empty.Empty, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-itk6h", "Not implemented")
}
func (s *Server) ResendUserInitMail(ctx context.Context, request *UserID) (_ *empty.Empty, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dk467", "Not implemented")
}

View File

@ -0,0 +1,18 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
)
func (s *Server) GetUserAgent(ctx context.Context, request *UserAgentID) (_ *UserAgent, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-iu7jF", "Not implemented")
}
func (s *Server) CreateUserAgent(ctx context.Context, request *UserAgentCreation) (_ *UserAgent, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-sdfk3", "Not implemented")
}
func (s *Server) RevokeUserAgent(ctx context.Context, id *UserAgentID) (_ *UserAgent, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-09HjK", "Not implemented")
}

View File

@ -0,0 +1,23 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) GetUserAgentSessions(ctx context.Context, id *UserAgentID) (_ *UserSessions, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ue45f", "Not implemented")
}
func (s *Server) GetUserSession(ctx context.Context, id *UserSessionID) (_ *UserSession, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-lor5h", "Not implemented")
}
func (s *Server) TerminateUserSession(ctx context.Context, id *UserSessionID) (_ *empty.Empty, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-bnmt6", "Not implemented")
}
func (s *Server) GetMyUserSessions(ctx context.Context, _ *empty.Empty) (_ *UserSessionViews, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-nc52s", "Not implemented")
}

View File

@ -0,0 +1,37 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
)
func (s *Server) SearchApplications(ctx context.Context, request *ApplicationSearchRequest) (*ApplicationSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-yW23f", "Not implemented")
}
func (s *Server) ApplicationByID(ctx context.Context, request *ApplicationID) (*Application, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-bmr6X", "Not implemented")
}
func (s *Server) CreateOIDCApplication(ctx context.Context, in *OIDCApplicationCreate) (*Application, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-poe4d", "Not implemented")
}
func (s *Server) UpdateApplication(ctx context.Context, in *ApplicationUpdate) (*Application, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-bmt6J", "Not implemented")
}
func (s *Server) DeactivateApplication(ctx context.Context, in *ApplicationID) (*Application, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-cD34f", "Not implemented")
}
func (s *Server) ReactivateApplication(ctx context.Context, in *ApplicationID) (*Application, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mo98S", "Not implemented")
}
func (s *Server) UpdateApplicationOIDCConfig(ctx context.Context, in *OIDCConfigUpdate) (*OIDCConfig, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-xm56g", "Not implemented")
}
func (s *Server) RegenerateOIDCClientSecret(ctx context.Context, in *ApplicationID) (*ClientSecret, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dlwp3", "Not implemented")
}
func (s *Server) ApplicationChanges(ctx context.Context, changesRequest *ChangeRequest) (*Changes, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-due45", "Not implemented")
}

View File

@ -0,0 +1,10 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
)
func (s *Server) SearchAuthGrant(ctx context.Context, grantSearch *AuthGrantSearchRequest) (*AuthGrantSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dkwd5", "Not implemented")
}

View File

@ -0,0 +1,26 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
)
func (s *Server) GetOrgByID(ctx context.Context, in *OrgID) (*Org, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-sdo5g", "Not implemented")
}
func (s *Server) GetOrgByDomainGlobal(ctx context.Context, in *OrgDomain) (*Org, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mop4s", "Not implemented")
}
func (s *Server) DeactivateOrg(ctx context.Context, in *OrgID) (*Org, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-vel3X", "Not implemented")
}
func (s *Server) ReactivateOrg(ctx context.Context, in *OrgID) (*Org, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-Scmk3", "Not implemented")
}
func (s *Server) OrgChanges(ctx context.Context, changesRequest *ChangeRequest) (*Changes, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mfiF4", "Not implemented")
}

View File

@ -0,0 +1,27 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) GetOrgMemberRoles(ctx context.Context, _ *empty.Empty) (*OrgMemberRoles, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-wz4vc", "Not implemented")
}
func (s *Server) SearchOrgMembers(ctx context.Context, in *OrgMemberSearchRequest) (*OrgMemberSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-wkdl3", "Not implemented")
}
func (s *Server) AddOrgMember(ctx context.Context, member *AddOrgMemberRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-Moe56", "Not implemented")
}
func (s *Server) ChangeOrgMember(ctx context.Context, member *ChangeOrgMemberRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-eod34", "Not implemented")
}
func (s *Server) RemoveOrgMember(ctx context.Context, member *RemoveOrgMemberRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-poeSw", "Not implemented")
}

View File

@ -0,0 +1,55 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) GetPasswordComplexityPolicy(ctx context.Context, _ *empty.Empty) (*PasswordComplexityPolicy, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-swe5v", "Not implemented")
}
func (s *Server) CreatePasswordComplexityPolicy(ctx context.Context, policy *PasswordComplexityPolicyCreate) (*PasswordComplexityPolicy, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-lo34s", "Not implemented")
}
func (s *Server) UpdatePasswordComplexityPolicy(ctx context.Context, policy *PasswordComplexityPolicyUpdate) (*PasswordComplexityPolicy, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-pl8fs", "Not implemented")
}
func (s *Server) DeletePasswordComplexityPolicy(ctx context.Context, ID *PasswordComplexityPolicyID) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-skw3f", "Not implemented")
}
func (s *Server) GetPasswordAgePolicy(ctx context.Context, _ *empty.Empty) (*PasswordAgePolicy, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-po9vb", "Not implemented")
}
func (s *Server) CreatePasswordAgePolicy(ctx context.Context, policy *PasswordAgePolicyCreate) (*PasswordAgePolicy, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ldp3v", "Not implemented")
}
func (s *Server) UpdatePasswordAgePolicy(ctx context.Context, policy *PasswordAgePolicyUpdate) (*PasswordAgePolicy, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ckep3", "Not implemented")
}
func (s *Server) DeletePasswordAgePolicy(ctx context.Context, ID *PasswordAgePolicyID) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-plo67", "Not implemented")
}
func (s *Server) GetPasswordLockoutPolicy(ctx context.Context, _ *empty.Empty) (*PasswordLockoutPolicy, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-GHkd9", "Not implemented")
}
func (s *Server) CreatePasswordLockoutPolicy(ctx context.Context, policy *PasswordLockoutPolicyCreate) (*PasswordLockoutPolicy, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mdk3c", "Not implemented")
}
func (s *Server) UpdatePasswordLockoutPolicy(ctx context.Context, policy *PasswordLockoutPolicyUpdate) (*PasswordLockoutPolicy, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-8dbN4", "Not implemented")
}
func (s *Server) DeletePasswordLockoutPolicy(ctx context.Context, ID *PasswordLockoutPolicyID) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-plV53", "Not implemented")
}

View File

@ -0,0 +1,20 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
pb_struct "github.com/golang/protobuf/ptypes/struct"
)
func (s *Server) Healthz(_ context.Context, e *empty.Empty) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mkd3y", "Not implemented")
}
func (s *Server) Ready(ctx context.Context, e *empty.Empty) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-pl6BM", "Not implemented")
}
func (s *Server) Validate(ctx context.Context, _ *empty.Empty) (*pb_struct.Struct, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-2wxF", "Not implemented")
}

View File

@ -0,0 +1,47 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) CreateProject(ctx context.Context, in *ProjectCreateRequest) (*Project, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mo34X", "Not implemented")
}
func (s *Server) UpdateProject(ctx context.Context, in *ProjectUpdateRequest) (*Project, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-0o4fB", "Not implemented")
}
func (s *Server) DeactivateProject(ctx context.Context, in *ProjectID) (*Project, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-4Sck8", "Not implemented")
}
func (s *Server) ReactivateProject(ctx context.Context, in *ProjectID) (*Project, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-0oVre", "Not implemented")
}
func (s *Server) SearchProjects(ctx context.Context, in *ProjectSearchRequest) (*ProjectSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-2sFvd", "Not implemented")
}
func (s *Server) ProjectByID(ctx context.Context, id *ProjectID) (*Project, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-plV5x", "Not implemented")
}
func (s *Server) GetGrantedProjectGrantByID(ctx context.Context, request *GrantedGrantID) (*ProjectGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-974vd", "Not implemented")
}
func (s *Server) AddProjectRole(ctx context.Context, in *ProjectRoleAdd) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-0ow2C", "Not implemented")
}
func (s *Server) RemoveProjectRole(ctx context.Context, in *ProjectRoleRemove) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-bm6iB", "Not implemented")
}
func (s *Server) SearchProjectRoles(ctx context.Context, in *ProjectRoleSearchRequest) (*ProjectRoleSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-plV56", "Not implemented")
}
func (s *Server) ProjectChanges(ctx context.Context, changesRequest *ChangeRequest) (*Changes, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mci3f", "Not implemented")
}

View File

@ -0,0 +1,32 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) GetProjectGrantMemberRoles(ctx context.Context, _ *empty.Empty) (*ProjectGrantMemberRoles, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mGo89", "Not implemented")
}
func (s *Server) SearchProjectGrants(ctx context.Context, request *ProjectGrantSearchRequest) (*ProjectGrantSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-po9fs", "Not implemented")
}
func (s *Server) ProjectGrantByID(ctx context.Context, request *ProjectGrantID) (*ProjectGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-nmr54", "Not implemented")
}
func (s *Server) CreateProjectGrant(ctx context.Context, in *ProjectGrantCreate) (*ProjectGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-fi45f", "Not implemented")
}
func (s *Server) UpdateProjectGrant(ctx context.Context, in *ProjectGrantUpdate) (*ProjectGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-nm7Ds", "Not implemented")
}
func (s *Server) DeactivateProjectGrant(ctx context.Context, in *ProjectGrantID) (*ProjectGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-xkwpr", "Not implemented")
}
func (s *Server) ReactivateProjectGrant(ctx context.Context, in *ProjectGrantID) (*ProjectGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mdk23", "Not implemented")
}

View File

@ -0,0 +1,23 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) SearchProjectGrantMembers(ctx context.Context, request *ProjectGrantMemberSearchRequest) (*ProjectGrantMemberSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-pldE4", "Not implemented")
}
func (s *Server) AddProjectGrantMember(ctx context.Context, in *ProjectGrantMemberAdd) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-po8r3", "Not implemented")
}
func (s *Server) ChangeProjectGrantMember(ctx context.Context, in *ProjectGrantMemberChange) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-asd3c", "Not implemented")
}
func (s *Server) RemoveProjectGrantMember(ctx context.Context, in *ProjectGrantMemberRemove) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-04kfs", "Not implemented")
}

View File

@ -0,0 +1,27 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) GetProjectMemberRoles(ctx context.Context, _ *empty.Empty) (*ProjectMemberRoles, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-qw34d", "Not implemented")
}
func (s *Server) SearchProjectMembers(ctx context.Context, request *ProjectMemberSearchRequest) (*ProjectMemberSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-PLr84", "Not implemented")
}
func (s *Server) AddProjectMember(ctx context.Context, in *ProjectMemberAdd) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-c2dks", "Not implemented")
}
func (s *Server) ChangeProjectMember(ctx context.Context, in *ProjectMemberChange) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-cms47", "Not implemented")
}
func (s *Server) RemoveProjectMember(ctx context.Context, in *ProjectMemberRemove) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-olw21", "Not implemented")
}

View File

@ -0,0 +1,34 @@
package grpc
import (
"google.golang.org/grpc"
)
var _ ManagementServiceServer = (*Server)(nil)
type Config struct {
Port string
SearchLimit int
}
type Server struct {
port string
searchLimit int
}
func StartServer(conf Config) *Server {
return &Server{
port: conf.Port,
searchLimit: conf.SearchLimit,
}
}
func (s *Server) GRPCPort() string {
return s.port
}
func (s *Server) GRPCServer() (*grpc.Server, error) {
gs := grpc.NewServer()
RegisterManagementServiceServer(gs, s)
return gs, nil
}

View File

@ -0,0 +1,103 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
)
func (s *Server) GetUserByID(ctx context.Context, userID *UserID) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-0oVbs", "Not implemented")
}
func (s *Server) GetUserByEmailGlobal(ctx context.Context, email *UserEmailID) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-9djSw", "Not implemented")
}
func (s *Server) SearchUsers(ctx context.Context, userSearch *UserSearchRequest) (*UserSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-as2Dc", "Not implemented")
}
func (s *Server) UserChanges(ctx context.Context, changesRequest *ChangeRequest) (*Changes, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-pl6Zu", "Not implemented")
}
func (s *Server) IsUserUnique(ctx context.Context, request *UniqueUserRequest) (*UniqueUserResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-olF56", "Not implemented")
}
func (s *Server) CreateUser(ctx context.Context, request *CreateUserRequest) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-sd4fs", "Not implemented")
}
func (s *Server) DeactivateUser(ctx context.Context, ID *UserID) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-Vgh64", "Not implemented")
}
func (s *Server) ReactivateUser(ctx context.Context, ID *UserID) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mCx4f", "Not implemented")
}
func (s *Server) LockUser(ctx context.Context, ID *UserID) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ds4fd", "Not implemented")
}
func (s *Server) UnlockUser(ctx context.Context, ID *UserID) (*User, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-MV7dd", "Not implemented")
}
func (s *Server) DeleteUser(ctx context.Context, ID *UserID) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-as4fg", "Not implemented")
}
func (s *Server) GetUserProfile(ctx context.Context, ID *UserID) (*UserProfile, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mT67d", "Not implemented")
}
func (s *Server) UpdateUserProfile(ctx context.Context, request *UpdateUserProfileRequest) (*UserProfile, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-asje3", "Not implemented")
}
func (s *Server) GetUserEmail(ctx context.Context, ID *UserID) (*UserEmail, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-peo9d", "Not implemented")
}
func (s *Server) ChangeUserEmail(ctx context.Context, request *UpdateUserEmailRequest) (*UserEmail, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-cloeS", "Not implemented")
}
func (s *Server) ResendEmailVerificationMail(ctx context.Context, ID *UserID) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dwsP9", "Not implemented")
}
func (s *Server) GetUserPhone(ctx context.Context, ID *UserID) (*UserPhone, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-wlf7f", "Not implemented")
}
func (s *Server) ChangeUserPhone(ctx context.Context, request *UpdateUserPhoneRequest) (*UserPhone, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-pld5g", "Not implemented")
}
func (s *Server) ResendPhoneVerificationCode(ctx context.Context, ID *UserID) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-98hdE", "Not implemented")
}
func (s *Server) GetUserAddress(ctx context.Context, ID *UserID) (*UserAddress, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-plt67", "Not implemented")
}
func (s *Server) UpdateUserAddress(ctx context.Context, request *UpdateUserAddressRequest) (*UserAddress, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dleo3", "Not implemented")
}
func (s *Server) SendSetPasswordNotification(ctx context.Context, request *SetPasswordNotificationRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-LSe7s", "Not implemented")
}
func (s *Server) SetInitialPassword(ctx context.Context, request *PasswordRequest) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ldo3s", "Not implemented")
}
func (s *Server) GetUserMfas(ctx context.Context, userID *UserID) (*MultiFactors, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ldmw3", "Not implemented")
}

View File

@ -0,0 +1,73 @@
package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
)
func (s *Server) SearchUserGrants(ctx context.Context, request *UserGrantSearchRequest) (*UserGrantSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dk3ds", "Not implemented")
}
func (s *Server) UserGrantByID(ctx context.Context, request *UserGrantID) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-9dksF", "Not implemented")
}
func (s *Server) CreateUserGrant(ctx context.Context, in *UserGrantCreate) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-2kdl2", "Not implemented")
}
func (s *Server) UpdateUserGrant(ctx context.Context, in *UserGrantUpdate) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-83jsF", "Not implemented")
}
func (s *Server) DeactivateUserGrant(ctx context.Context, in *UserGrantID) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-93dj3", "Not implemented")
}
func (s *Server) ReactivateUserGrant(ctx context.Context, in *UserGrantID) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-2kSfs", "Not implemented")
}
func (s *Server) SearchProjectUserGrants(ctx context.Context, request *ProjectUserGrantSearchRequest) (*UserGrantSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-8jdSw", "Not implemented")
}
func (s *Server) ProjectUserGrantByID(ctx context.Context, request *ProjectUserGrantID) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-dk32s", "Not implemented")
}
func (s *Server) CreateProjectUserGrant(ctx context.Context, in *UserGrantCreate) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-0or5G", "Not implemented")
}
func (s *Server) UpdateProjectUserGrant(ctx context.Context, in *ProjectUserGrantUpdate) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-asl4D", "Not implemented")
}
func (s *Server) DeactivateProjectUserGrant(ctx context.Context, in *ProjectUserGrantID) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-2fG6h", "Not implemented")
}
func (s *Server) ReactivateProjectUserGrant(ctx context.Context, in *ProjectUserGrantID) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-03kSc", "Not implemented")
}
func (s *Server) SearchProjectGrantUserGrants(ctx context.Context, request *ProjectGrantUserGrantSearchRequest) (*UserGrantSearchResponse, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-32sFs", "Not implemented")
}
func (s *Server) ProjectGrantUserGrantByID(ctx context.Context, request *ProjectGrantUserGrantID) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-9kfSc", "Not implemented")
}
func (s *Server) CreateProjectGrantUserGrant(ctx context.Context, in *ProjectGrantUserGrantCreate) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-293md", "Not implemented")
}
func (s *Server) UpdateProjectGrantUserGrant(ctx context.Context, in *ProjectGrantUserGrantUpdate) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-76fGe", "Not implemented")
}
func (s *Server) DeactivateProjectGrantUserGrant(ctx context.Context, in *ProjectGrantUserGrantID) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-sFsi3", "Not implemented")
}
func (s *Server) ReactivateProjectGrantUserGrant(ctx context.Context, in *ProjectGrantUserGrantID) (*UserGrant, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ckr56", "Not implemented")
}