diff --git a/.configs/sqlc.yaml b/.configs/sqlc.yaml index 253278864..f9701b677 100644 --- a/.configs/sqlc.yaml +++ b/.configs/sqlc.yaml @@ -170,6 +170,15 @@ sql: package: "grpcdeploymentsql" out: "../internal/grpc/grpcdeployment/grpcdeploymentsql" + - <<: *default_domain + name: "Service accounts SQL for gRPC" + queries: "../internal/grpc/grpcserviceaccount/queries" + gen: + go: + <<: *default_go + package: "grpcserviceaccountsql" + out: "../internal/grpc/grpcserviceaccount/grpcserviceaccountsql" + - <<: *default_domain name: "Usersync SQL" queries: "../internal/usersync/queries" diff --git a/internal/grpc/grpc.go b/internal/grpc/grpc.go index f3df1ef3c..0a506f560 100644 --- a/internal/grpc/grpc.go +++ b/internal/grpc/grpc.go @@ -10,6 +10,7 @@ import ( "github.com/nais/api/internal/grpc/grpcdatabase" "github.com/nais/api/internal/grpc/grpcdeployment" "github.com/nais/api/internal/grpc/grpcreconciler" + "github.com/nais/api/internal/grpc/grpcserviceaccount" "github.com/nais/api/internal/grpc/grpcteam" "github.com/nais/api/internal/grpc/grpcuser" "github.com/nais/api/internal/kubernetes/watchers" @@ -37,6 +38,7 @@ func Run(ctx context.Context, listenAddress string, pool *pgxpool.Pool, sqlDatab protoapi.RegisterReconcilersServer(s, grpcreconciler.NewServer(pool)) protoapi.RegisterDeploymentsServer(s, grpcdeployment.NewServer(pool)) protoapi.RegisterDatabasesServer(s, grpcdatabase.NewServer(sqlDatabaseWatcher, postgresBranchWatcher)) + protoapi.RegisterServiceAccountsServer(s, grpcserviceaccount.NewServer(pool)) g, ctx := errgroup.WithContext(ctx) g.Go(func() error { return s.Serve(lis) }) diff --git a/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/db.go b/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/db.go new file mode 100644 index 000000000..68ee942c5 --- /dev/null +++ b/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/db.go @@ -0,0 +1,30 @@ +// Code generated by sqlc. DO NOT EDIT. + +package grpcserviceaccountsql + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/models.go b/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/models.go new file mode 100644 index 000000000..c47199709 --- /dev/null +++ b/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/models.go @@ -0,0 +1,3 @@ +// Code generated by sqlc. DO NOT EDIT. + +package grpcserviceaccountsql diff --git a/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/querier.go b/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/querier.go new file mode 100644 index 000000000..aa21be60b --- /dev/null +++ b/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/querier.go @@ -0,0 +1,17 @@ +// Code generated by sqlc. DO NOT EDIT. + +package grpcserviceaccountsql + +import ( + "context" + + "github.com/google/uuid" +) + +type Querier interface { + AssignRole(ctx context.Context, arg AssignRoleParams) error + Create(ctx context.Context, arg CreateParams) (*CreateRow, error) + CreateToken(ctx context.Context, arg CreateTokenParams) (uuid.UUID, error) +} + +var _ Querier = (*Queries)(nil) diff --git a/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/service_accounts.sql.go b/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/service_accounts.sql.go new file mode 100644 index 000000000..b1a815c38 --- /dev/null +++ b/internal/grpc/grpcserviceaccount/grpcserviceaccountsql/service_accounts.sql.go @@ -0,0 +1,103 @@ +// Code generated by sqlc. DO NOT EDIT. +// source: service_accounts.sql + +package grpcserviceaccountsql + +import ( + "context" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" + "github.com/nais/api/internal/slug" +) + +const assignRole = `-- name: AssignRole :exec +INSERT INTO + service_account_roles (service_account_id, role_name) +VALUES + ($1, $2) +ON CONFLICT DO NOTHING +` + +type AssignRoleParams struct { + ServiceAccountID uuid.UUID + RoleName string +} + +func (q *Queries) AssignRole(ctx context.Context, arg AssignRoleParams) error { + _, err := q.db.Exec(ctx, assignRole, arg.ServiceAccountID, arg.RoleName) + return err +} + +const create = `-- name: Create :one +INSERT INTO + service_accounts (name, description, team_slug) +VALUES + ($1, $2, $3) +ON CONFLICT (name, team_slug) DO UPDATE +SET + name = EXCLUDED.name +RETURNING + id, + (xmax = 0) AS created +` + +type CreateParams struct { + Name string + Description string + TeamSlug *slug.Slug +} + +type CreateRow struct { + ID uuid.UUID + Created bool +} + +func (q *Queries) Create(ctx context.Context, arg CreateParams) (*CreateRow, error) { + row := q.db.QueryRow(ctx, create, arg.Name, arg.Description, arg.TeamSlug) + var i CreateRow + err := row.Scan(&i.ID, &i.Created) + return &i, err +} + +const createToken = `-- name: CreateToken :one +INSERT INTO + service_account_tokens ( + expires_at, + name, + description, + token, + service_account_id + ) +VALUES + ( + $1, + $2, + $3, + $4, + $5 + ) +RETURNING + id +` + +type CreateTokenParams struct { + ExpiresAt pgtype.Date + Name string + Description string + Token string + ServiceAccountID uuid.UUID +} + +func (q *Queries) CreateToken(ctx context.Context, arg CreateTokenParams) (uuid.UUID, error) { + row := q.db.QueryRow(ctx, createToken, + arg.ExpiresAt, + arg.Name, + arg.Description, + arg.Token, + arg.ServiceAccountID, + ) + var id uuid.UUID + err := row.Scan(&id) + return id, err +} diff --git a/internal/grpc/grpcserviceaccount/queries/service_accounts.sql b/internal/grpc/grpcserviceaccount/queries/service_accounts.sql new file mode 100644 index 000000000..ff2b317da --- /dev/null +++ b/internal/grpc/grpcserviceaccount/queries/service_accounts.sql @@ -0,0 +1,41 @@ +-- name: Create :one +INSERT INTO + service_accounts (name, description, team_slug) +VALUES + (@name, @description, @team_slug) +ON CONFLICT (name, team_slug) DO UPDATE +SET + name = EXCLUDED.name +RETURNING + id, + (xmax = 0) AS created +; + +-- name: AssignRole :exec +INSERT INTO + service_account_roles (service_account_id, role_name) +VALUES + (@service_account_id, @role_name) +ON CONFLICT DO NOTHING +; + +-- name: CreateToken :one +INSERT INTO + service_account_tokens ( + expires_at, + name, + description, + token, + service_account_id + ) +VALUES + ( + @expires_at, + @name, + @description, + @token, + @service_account_id + ) +RETURNING + id +; diff --git a/internal/grpc/grpcserviceaccount/server.go b/internal/grpc/grpcserviceaccount/server.go new file mode 100644 index 000000000..6546cd02f --- /dev/null +++ b/internal/grpc/grpcserviceaccount/server.go @@ -0,0 +1,102 @@ +package grpcserviceaccount + +import ( + "context" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" + "github.com/jackc/pgx/v5/pgxpool" + "github.com/nais/api/internal/grpc/grpcserviceaccount/grpcserviceaccountsql" + "github.com/nais/api/internal/serviceaccount" + "github.com/nais/api/internal/slug" + "github.com/nais/api/pkg/apiclient/protoapi" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type Server struct { + querier grpcserviceaccountsql.Querier + protoapi.UnimplementedServiceAccountsServer +} + +func NewServer(pool *pgxpool.Pool) *Server { + return &Server{ + querier: grpcserviceaccountsql.New(pool), + } +} + +func (s *Server) Create(ctx context.Context, req *protoapi.CreateServiceAccountRequest) (*protoapi.CreateServiceAccountResponse, error) { + teamSlug := slug.Slug(req.GetTeamSlug()) + if teamSlug == "" { + return nil, status.Errorf(codes.InvalidArgument, "team_slug is required") + } + if req.GetName() == "" { + return nil, status.Errorf(codes.InvalidArgument, "name is required") + } + + team := teamSlug + row, err := s.querier.Create(ctx, grpcserviceaccountsql.CreateParams{ + Name: req.GetName(), + Description: req.GetDescription(), + TeamSlug: &team, + }) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to create service account: %s", err) + } + + if role := req.GetRoleName(); role != "" { + err := s.querier.AssignRole(ctx, grpcserviceaccountsql.AssignRoleParams{ + ServiceAccountID: row.ID, + RoleName: role, + }) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to assign role %q: %s", role, err) + } + } + + return protoapi.CreateServiceAccountResponse_builder{ + Id: row.ID.String(), + Created: row.Created, + }.Build(), nil +} + +func (s *Server) CreateToken(ctx context.Context, req *protoapi.CreateServiceAccountTokenRequest) (*protoapi.CreateServiceAccountTokenResponse, error) { + serviceAccountID, err := uuid.Parse(req.GetServiceAccountId()) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "service_account_id must be a valid UUID: %s", err) + } + if req.GetName() == "" { + return nil, status.Errorf(codes.InvalidArgument, "name is required") + } + + secret, err := serviceaccount.GenerateToken() + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to generate token") + } + hashed, err := serviceaccount.HashToken(secret) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to hash token") + } + + // expires_at is day-granular on the server side. + expiresAt := pgtype.Date{} + if req.HasExpiresAt() && req.GetExpiresAt().IsValid() { + expiresAt = pgtype.Date{Time: req.GetExpiresAt().AsTime(), Valid: true} + } + + id, err := s.querier.CreateToken(ctx, grpcserviceaccountsql.CreateTokenParams{ + ExpiresAt: expiresAt, + Name: req.GetName(), + Description: req.GetDescription(), + Token: hashed, + ServiceAccountID: serviceAccountID, + }) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to create token: %s", err) + } + + return protoapi.CreateServiceAccountTokenResponse_builder{ + Id: id.String(), + Secret: secret, + }.Build(), nil +} diff --git a/internal/grpc/grpcteam/grpcteamsql/querier.go b/internal/grpc/grpcteam/grpcteamsql/querier.go index 452838e21..7c7ebc8a1 100644 --- a/internal/grpc/grpcteam/grpcteamsql/querier.go +++ b/internal/grpc/grpcteam/grpcteamsql/querier.go @@ -12,6 +12,7 @@ type Querier interface { Count(ctx context.Context) (int64, error) CountEnvironments(ctx context.Context, teamSlug slug.Slug) (int64, error) CountMembers(ctx context.Context, teamSlug slug.Slug) (int64, error) + Create(ctx context.Context, arg CreateParams) (*Team, error) Delete(ctx context.Context, argSlug slug.Slug) error Get(ctx context.Context, argSlug slug.Slug) (*Team, error) GetTeamRepositories(ctx context.Context, teamSlug slug.Slug) ([]string, error) diff --git a/internal/grpc/grpcteam/grpcteamsql/teams.sql.go b/internal/grpc/grpcteam/grpcteamsql/teams.sql.go index 93197cf21..412c2e312 100644 --- a/internal/grpc/grpcteam/grpcteamsql/teams.sql.go +++ b/internal/grpc/grpcteam/grpcteamsql/teams.sql.go @@ -58,6 +58,42 @@ func (q *Queries) CountMembers(ctx context.Context, teamSlug slug.Slug) (int64, return total, err } +const create = `-- name: Create :one +INSERT INTO + teams (slug, purpose, slack_channel) +VALUES + ($1, $2, $3) +ON CONFLICT (slug) DO UPDATE +SET + slug = EXCLUDED.slug +RETURNING + slug, purpose, last_successful_sync, slack_channel, google_group_email, entra_id_group_id, github_team_slug, gar_repository, cdn_bucket, delete_key_confirmed_at +` + +type CreateParams struct { + Slug slug.Slug + Purpose string + SlackChannel string +} + +func (q *Queries) Create(ctx context.Context, arg CreateParams) (*Team, error) { + row := q.db.QueryRow(ctx, create, arg.Slug, arg.Purpose, arg.SlackChannel) + var i Team + err := row.Scan( + &i.Slug, + &i.Purpose, + &i.LastSuccessfulSync, + &i.SlackChannel, + &i.GoogleGroupEmail, + &i.EntraIDGroupID, + &i.GithubTeamSlug, + &i.GarRepository, + &i.CdnBucket, + &i.DeleteKeyConfirmedAt, + ) + return &i, err +} + const delete = `-- name: Delete :exec DELETE FROM teams WHERE diff --git a/internal/grpc/grpcteam/queries/teams.sql b/internal/grpc/grpcteam/queries/teams.sql index 91e91d4c1..2d28b87a9 100644 --- a/internal/grpc/grpcteam/queries/teams.sql +++ b/internal/grpc/grpcteam/queries/teams.sql @@ -22,6 +22,18 @@ WHERE slug = @slug ; +-- name: Create :one +INSERT INTO + teams (slug, purpose, slack_channel) +VALUES + (@slug, @purpose, @slack_channel) +ON CONFLICT (slug) DO UPDATE +SET + slug = EXCLUDED.slug +RETURNING + * +; + -- name: List :many SELECT * diff --git a/internal/grpc/grpcteam/server.go b/internal/grpc/grpcteam/server.go index 90672c6b5..af6913557 100644 --- a/internal/grpc/grpcteam/server.go +++ b/internal/grpc/grpcteam/server.go @@ -52,6 +52,28 @@ func (t *Server) Get(ctx context.Context, req *protoapi.GetTeamRequest) (*protoa }, nil } +func (t *Server) Create(ctx context.Context, req *protoapi.CreateTeamRequest) (*protoapi.CreateTeamResponse, error) { + if req.Slug == "" { + return nil, status.Errorf(codes.InvalidArgument, "slug is required") + } + if req.Slug != "nais-verification" { + return nil, status.Errorf(codes.InvalidArgument, "only the nais-verification team may be created through this endpoint") + } + + team, err := t.querier.Create(ctx, grpcteamsql.CreateParams{ + Slug: slug.Slug(req.Slug), + Purpose: req.Purpose, + SlackChannel: req.SlackChannel, + }) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to create team: %s", err) + } + + return &protoapi.CreateTeamResponse{ + Team: toProtoTeam(team), + }, nil +} + func (t *Server) List(ctx context.Context, req *protoapi.ListTeamsRequest) (*protoapi.ListTeamsResponse, error) { limit, offset := grpcpagination.Pagination(req) teams, err := t.querier.List(ctx, grpcteamsql.ListParams{ diff --git a/internal/rest/rest.go b/internal/rest/rest.go index 2e8013c3f..2d4596068 100644 --- a/internal/rest/rest.go +++ b/internal/rest/rest.go @@ -108,6 +108,8 @@ func MakeRouter(ctx context.Context, cfg Config) *chi.Mux { r.Use(cfg.GitHubOIDCMiddleware) } + r.Use(middleware.ApiKeyAuthentication()) + r.Use( middleware.RequireAuthenticatedUser(), ) diff --git a/pkg/apiclient/apiclient.go b/pkg/apiclient/apiclient.go index 1c0603021..bf2ca3f12 100644 --- a/pkg/apiclient/apiclient.go +++ b/pkg/apiclient/apiclient.go @@ -40,6 +40,10 @@ func (a *APIClient) Databases() protoapi.DatabasesClient { return protoapi.NewDatabasesClient(a.conn) } +func (a *APIClient) ServiceAccounts() protoapi.ServiceAccountsClient { + return protoapi.NewServiceAccountsClient(a.conn) +} + func (a *APIClient) Close() error { return a.conn.Close() } diff --git a/pkg/apiclient/protoapi/mock_service_accounts_server.go b/pkg/apiclient/protoapi/mock_service_accounts_server.go new file mode 100644 index 000000000..5f936a5fe --- /dev/null +++ b/pkg/apiclient/protoapi/mock_service_accounts_server.go @@ -0,0 +1,208 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package protoapi + +import ( + "context" + + mock "github.com/stretchr/testify/mock" +) + +// NewMockServiceAccountsServer creates a new instance of MockServiceAccountsServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockServiceAccountsServer(t interface { + mock.TestingT + Cleanup(func()) +}, +) *MockServiceAccountsServer { + mock := &MockServiceAccountsServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockServiceAccountsServer is an autogenerated mock type for the ServiceAccountsServer type +type MockServiceAccountsServer struct { + mock.Mock +} + +type MockServiceAccountsServer_Expecter struct { + mock *mock.Mock +} + +func (_m *MockServiceAccountsServer) EXPECT() *MockServiceAccountsServer_Expecter { + return &MockServiceAccountsServer_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function for the type MockServiceAccountsServer +func (_mock *MockServiceAccountsServer) Create(context1 context.Context, createServiceAccountRequest *CreateServiceAccountRequest) (*CreateServiceAccountResponse, error) { + ret := _mock.Called(context1, createServiceAccountRequest) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *CreateServiceAccountResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *CreateServiceAccountRequest) (*CreateServiceAccountResponse, error)); ok { + return returnFunc(context1, createServiceAccountRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *CreateServiceAccountRequest) *CreateServiceAccountResponse); ok { + r0 = returnFunc(context1, createServiceAccountRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*CreateServiceAccountResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *CreateServiceAccountRequest) error); ok { + r1 = returnFunc(context1, createServiceAccountRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockServiceAccountsServer_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockServiceAccountsServer_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - context1 context.Context +// - createServiceAccountRequest *CreateServiceAccountRequest +func (_e *MockServiceAccountsServer_Expecter) Create(context1 interface{}, createServiceAccountRequest interface{}) *MockServiceAccountsServer_Create_Call { + return &MockServiceAccountsServer_Create_Call{Call: _e.mock.On("Create", context1, createServiceAccountRequest)} +} + +func (_c *MockServiceAccountsServer_Create_Call) Run(run func(context1 context.Context, createServiceAccountRequest *CreateServiceAccountRequest)) *MockServiceAccountsServer_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *CreateServiceAccountRequest + if args[1] != nil { + arg1 = args[1].(*CreateServiceAccountRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockServiceAccountsServer_Create_Call) Return(createServiceAccountResponse *CreateServiceAccountResponse, err error) *MockServiceAccountsServer_Create_Call { + _c.Call.Return(createServiceAccountResponse, err) + return _c +} + +func (_c *MockServiceAccountsServer_Create_Call) RunAndReturn(run func(context1 context.Context, createServiceAccountRequest *CreateServiceAccountRequest) (*CreateServiceAccountResponse, error)) *MockServiceAccountsServer_Create_Call { + _c.Call.Return(run) + return _c +} + +// CreateToken provides a mock function for the type MockServiceAccountsServer +func (_mock *MockServiceAccountsServer) CreateToken(context1 context.Context, createServiceAccountTokenRequest *CreateServiceAccountTokenRequest) (*CreateServiceAccountTokenResponse, error) { + ret := _mock.Called(context1, createServiceAccountTokenRequest) + + if len(ret) == 0 { + panic("no return value specified for CreateToken") + } + + var r0 *CreateServiceAccountTokenResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *CreateServiceAccountTokenRequest) (*CreateServiceAccountTokenResponse, error)); ok { + return returnFunc(context1, createServiceAccountTokenRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *CreateServiceAccountTokenRequest) *CreateServiceAccountTokenResponse); ok { + r0 = returnFunc(context1, createServiceAccountTokenRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*CreateServiceAccountTokenResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *CreateServiceAccountTokenRequest) error); ok { + r1 = returnFunc(context1, createServiceAccountTokenRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockServiceAccountsServer_CreateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateToken' +type MockServiceAccountsServer_CreateToken_Call struct { + *mock.Call +} + +// CreateToken is a helper method to define mock.On call +// - context1 context.Context +// - createServiceAccountTokenRequest *CreateServiceAccountTokenRequest +func (_e *MockServiceAccountsServer_Expecter) CreateToken(context1 interface{}, createServiceAccountTokenRequest interface{}) *MockServiceAccountsServer_CreateToken_Call { + return &MockServiceAccountsServer_CreateToken_Call{Call: _e.mock.On("CreateToken", context1, createServiceAccountTokenRequest)} +} + +func (_c *MockServiceAccountsServer_CreateToken_Call) Run(run func(context1 context.Context, createServiceAccountTokenRequest *CreateServiceAccountTokenRequest)) *MockServiceAccountsServer_CreateToken_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *CreateServiceAccountTokenRequest + if args[1] != nil { + arg1 = args[1].(*CreateServiceAccountTokenRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockServiceAccountsServer_CreateToken_Call) Return(createServiceAccountTokenResponse *CreateServiceAccountTokenResponse, err error) *MockServiceAccountsServer_CreateToken_Call { + _c.Call.Return(createServiceAccountTokenResponse, err) + return _c +} + +func (_c *MockServiceAccountsServer_CreateToken_Call) RunAndReturn(run func(context1 context.Context, createServiceAccountTokenRequest *CreateServiceAccountTokenRequest) (*CreateServiceAccountTokenResponse, error)) *MockServiceAccountsServer_CreateToken_Call { + _c.Call.Return(run) + return _c +} + +// mustEmbedUnimplementedServiceAccountsServer provides a mock function for the type MockServiceAccountsServer +func (_mock *MockServiceAccountsServer) mustEmbedUnimplementedServiceAccountsServer() { + _mock.Called() + return +} + +// MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedServiceAccountsServer' +type MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call struct { + *mock.Call +} + +// mustEmbedUnimplementedServiceAccountsServer is a helper method to define mock.On call +func (_e *MockServiceAccountsServer_Expecter) mustEmbedUnimplementedServiceAccountsServer() *MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call { + return &MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call{Call: _e.mock.On("mustEmbedUnimplementedServiceAccountsServer")} +} + +func (_c *MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call) Run(run func()) *MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call) Return() *MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call { + _c.Call.Return() + return _c +} + +func (_c *MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call) RunAndReturn(run func()) *MockServiceAccountsServer_mustEmbedUnimplementedServiceAccountsServer_Call { + _c.Run(run) + return _c +} diff --git a/pkg/apiclient/protoapi/mock_teams_server.go b/pkg/apiclient/protoapi/mock_teams_server.go index 4c60f4fd2..38fe36ad5 100644 --- a/pkg/apiclient/protoapi/mock_teams_server.go +++ b/pkg/apiclient/protoapi/mock_teams_server.go @@ -38,6 +38,74 @@ func (_m *MockTeamsServer) EXPECT() *MockTeamsServer_Expecter { return &MockTeamsServer_Expecter{mock: &_m.Mock} } +// Create provides a mock function for the type MockTeamsServer +func (_mock *MockTeamsServer) Create(context1 context.Context, createTeamRequest *CreateTeamRequest) (*CreateTeamResponse, error) { + ret := _mock.Called(context1, createTeamRequest) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *CreateTeamResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *CreateTeamRequest) (*CreateTeamResponse, error)); ok { + return returnFunc(context1, createTeamRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *CreateTeamRequest) *CreateTeamResponse); ok { + r0 = returnFunc(context1, createTeamRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*CreateTeamResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *CreateTeamRequest) error); ok { + r1 = returnFunc(context1, createTeamRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockTeamsServer_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockTeamsServer_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - context1 context.Context +// - createTeamRequest *CreateTeamRequest +func (_e *MockTeamsServer_Expecter) Create(context1 interface{}, createTeamRequest interface{}) *MockTeamsServer_Create_Call { + return &MockTeamsServer_Create_Call{Call: _e.mock.On("Create", context1, createTeamRequest)} +} + +func (_c *MockTeamsServer_Create_Call) Run(run func(context1 context.Context, createTeamRequest *CreateTeamRequest)) *MockTeamsServer_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *CreateTeamRequest + if args[1] != nil { + arg1 = args[1].(*CreateTeamRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockTeamsServer_Create_Call) Return(createTeamResponse *CreateTeamResponse, err error) *MockTeamsServer_Create_Call { + _c.Call.Return(createTeamResponse, err) + return _c +} + +func (_c *MockTeamsServer_Create_Call) RunAndReturn(run func(context1 context.Context, createTeamRequest *CreateTeamRequest) (*CreateTeamResponse, error)) *MockTeamsServer_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function for the type MockTeamsServer func (_mock *MockTeamsServer) Delete(context1 context.Context, deleteTeamRequest *DeleteTeamRequest) (*DeleteTeamResponse, error) { ret := _mock.Called(context1, deleteTeamRequest) diff --git a/pkg/apiclient/protoapi/schema/serviceaccounts.proto b/pkg/apiclient/protoapi/schema/serviceaccounts.proto new file mode 100644 index 000000000..abdd8d50e --- /dev/null +++ b/pkg/apiclient/protoapi/schema/serviceaccounts.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +package nais.api.protobuf; + +import "google/protobuf/timestamp.proto"; + +option go_package = "./pkg/apiclient/protoapi"; + +service ServiceAccounts { + rpc Create(CreateServiceAccountRequest) returns (CreateServiceAccountResponse) {} + rpc CreateToken(CreateServiceAccountTokenRequest) returns (CreateServiceAccountTokenResponse) {} +} + +message CreateServiceAccountRequest { + string team_slug = 1; + string name = 2; + string description = 3; + string role_name = 4; +} + +message CreateServiceAccountResponse { + string id = 1; + // Whether the service account was created by this call (false if it already + // existed). + bool created = 2; +} + +message CreateServiceAccountTokenRequest { + string service_account_id = 1; + string name = 2; + string description = 3; + // Optional expiry. Note: day-granular on the server side. + optional google.protobuf.Timestamp expires_at = 4; +} + +message CreateServiceAccountTokenResponse { + string id = 1; + // The plaintext token secret. Only returned once. + string secret = 2; +} diff --git a/pkg/apiclient/protoapi/schema/teams.proto b/pkg/apiclient/protoapi/schema/teams.proto index 27d909a99..510e5c412 100644 --- a/pkg/apiclient/protoapi/schema/teams.proto +++ b/pkg/apiclient/protoapi/schema/teams.proto @@ -31,6 +31,7 @@ message ListAuthorizedRepositoriesResponse { service Teams { rpc ListAuthorizedRepositories(ListAuthorizedRepositoriesRequest) returns (ListAuthorizedRepositoriesResponse) {} rpc Get(GetTeamRequest) returns (GetTeamResponse) {} + rpc Create(CreateTeamRequest) returns (CreateTeamResponse) {} rpc List(ListTeamsRequest) returns (ListTeamsResponse) {} rpc ListForUserByEmail(ListForUserByEmailRequest) returns (ListTeamsResponse) {} rpc Members(ListTeamMembersRequest) returns (ListTeamMembersResponse) {} @@ -95,6 +96,16 @@ message GetTeamRequest { string slug = 1; } +message CreateTeamRequest { + string slug = 1; + string purpose = 2; + string slack_channel = 3; +} + +message CreateTeamResponse { + Team team = 1; +} + message ListTeamsRequest { int64 limit = 1; int64 offset = 2; diff --git a/pkg/apiclient/protoapi/serviceaccounts.pb.go b/pkg/apiclient/protoapi/serviceaccounts.pb.go new file mode 100644 index 000000000..830594ed4 --- /dev/null +++ b/pkg/apiclient/protoapi/serviceaccounts.pb.go @@ -0,0 +1,489 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc v5.29.3 +// source: serviceaccounts.proto + +//go:build !protoopaque + +package protoapi + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateServiceAccountRequest struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + TeamSlug string `protobuf:"bytes,1,opt,name=team_slug,json=teamSlug,proto3" json:"team_slug,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + RoleName string `protobuf:"bytes,4,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateServiceAccountRequest) Reset() { + *x = CreateServiceAccountRequest{} + mi := &file_serviceaccounts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateServiceAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateServiceAccountRequest) ProtoMessage() {} + +func (x *CreateServiceAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_serviceaccounts_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateServiceAccountRequest) GetTeamSlug() string { + if x != nil { + return x.TeamSlug + } + return "" +} + +func (x *CreateServiceAccountRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateServiceAccountRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CreateServiceAccountRequest) GetRoleName() string { + if x != nil { + return x.RoleName + } + return "" +} + +func (x *CreateServiceAccountRequest) SetTeamSlug(v string) { + x.TeamSlug = v +} + +func (x *CreateServiceAccountRequest) SetName(v string) { + x.Name = v +} + +func (x *CreateServiceAccountRequest) SetDescription(v string) { + x.Description = v +} + +func (x *CreateServiceAccountRequest) SetRoleName(v string) { + x.RoleName = v +} + +type CreateServiceAccountRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + TeamSlug string + Name string + Description string + RoleName string +} + +func (b0 CreateServiceAccountRequest_builder) Build() *CreateServiceAccountRequest { + m0 := &CreateServiceAccountRequest{} + b, x := &b0, m0 + _, _ = b, x + x.TeamSlug = b.TeamSlug + x.Name = b.Name + x.Description = b.Description + x.RoleName = b.RoleName + return m0 +} + +type CreateServiceAccountResponse struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Whether the service account was created by this call (false if it already + // existed). + Created bool `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateServiceAccountResponse) Reset() { + *x = CreateServiceAccountResponse{} + mi := &file_serviceaccounts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateServiceAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateServiceAccountResponse) ProtoMessage() {} + +func (x *CreateServiceAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_serviceaccounts_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateServiceAccountResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateServiceAccountResponse) GetCreated() bool { + if x != nil { + return x.Created + } + return false +} + +func (x *CreateServiceAccountResponse) SetId(v string) { + x.Id = v +} + +func (x *CreateServiceAccountResponse) SetCreated(v bool) { + x.Created = v +} + +type CreateServiceAccountResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string + // Whether the service account was created by this call (false if it already + // existed). + Created bool +} + +func (b0 CreateServiceAccountResponse_builder) Build() *CreateServiceAccountResponse { + m0 := &CreateServiceAccountResponse{} + b, x := &b0, m0 + _, _ = b, x + x.Id = b.Id + x.Created = b.Created + return m0 +} + +type CreateServiceAccountTokenRequest struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + ServiceAccountId string `protobuf:"bytes,1,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Optional expiry. Note: day-granular on the server side. + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateServiceAccountTokenRequest) Reset() { + *x = CreateServiceAccountTokenRequest{} + mi := &file_serviceaccounts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateServiceAccountTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateServiceAccountTokenRequest) ProtoMessage() {} + +func (x *CreateServiceAccountTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_serviceaccounts_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateServiceAccountTokenRequest) GetServiceAccountId() string { + if x != nil { + return x.ServiceAccountId + } + return "" +} + +func (x *CreateServiceAccountTokenRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateServiceAccountTokenRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CreateServiceAccountTokenRequest) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *CreateServiceAccountTokenRequest) SetServiceAccountId(v string) { + x.ServiceAccountId = v +} + +func (x *CreateServiceAccountTokenRequest) SetName(v string) { + x.Name = v +} + +func (x *CreateServiceAccountTokenRequest) SetDescription(v string) { + x.Description = v +} + +func (x *CreateServiceAccountTokenRequest) SetExpiresAt(v *timestamppb.Timestamp) { + x.ExpiresAt = v +} + +func (x *CreateServiceAccountTokenRequest) HasExpiresAt() bool { + if x == nil { + return false + } + return x.ExpiresAt != nil +} + +func (x *CreateServiceAccountTokenRequest) ClearExpiresAt() { + x.ExpiresAt = nil +} + +type CreateServiceAccountTokenRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + ServiceAccountId string + Name string + Description string + // Optional expiry. Note: day-granular on the server side. + ExpiresAt *timestamppb.Timestamp +} + +func (b0 CreateServiceAccountTokenRequest_builder) Build() *CreateServiceAccountTokenRequest { + m0 := &CreateServiceAccountTokenRequest{} + b, x := &b0, m0 + _, _ = b, x + x.ServiceAccountId = b.ServiceAccountId + x.Name = b.Name + x.Description = b.Description + x.ExpiresAt = b.ExpiresAt + return m0 +} + +type CreateServiceAccountTokenResponse struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The plaintext token secret. Only returned once. + Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateServiceAccountTokenResponse) Reset() { + *x = CreateServiceAccountTokenResponse{} + mi := &file_serviceaccounts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateServiceAccountTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateServiceAccountTokenResponse) ProtoMessage() {} + +func (x *CreateServiceAccountTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_serviceaccounts_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateServiceAccountTokenResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateServiceAccountTokenResponse) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +func (x *CreateServiceAccountTokenResponse) SetId(v string) { + x.Id = v +} + +func (x *CreateServiceAccountTokenResponse) SetSecret(v string) { + x.Secret = v +} + +type CreateServiceAccountTokenResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string + // The plaintext token secret. Only returned once. + Secret string +} + +func (b0 CreateServiceAccountTokenResponse_builder) Build() *CreateServiceAccountTokenResponse { + m0 := &CreateServiceAccountTokenResponse{} + b, x := &b0, m0 + _, _ = b, x + x.Id = b.Id + x.Secret = b.Secret + return m0 +} + +var File_serviceaccounts_proto protoreflect.FileDescriptor + +var file_serviceaccounts_proto_rawDesc = string([]byte{ + 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x1b, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, + 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x74, 0x65, 0x61, 0x6d, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, + 0x0a, 0x09, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x48, 0x0a, 0x1c, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0xd5, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, + 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, + 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, + 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x22, 0x4b, 0x0a, + 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x32, 0xfa, 0x01, 0x0a, 0x0f, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x6b, + 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x0b, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x2e, 0x6e, 0x61, 0x69, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x61, 0x70, 0x69, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var file_serviceaccounts_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_serviceaccounts_proto_goTypes = []any{ + (*CreateServiceAccountRequest)(nil), // 0: nais.api.protobuf.CreateServiceAccountRequest + (*CreateServiceAccountResponse)(nil), // 1: nais.api.protobuf.CreateServiceAccountResponse + (*CreateServiceAccountTokenRequest)(nil), // 2: nais.api.protobuf.CreateServiceAccountTokenRequest + (*CreateServiceAccountTokenResponse)(nil), // 3: nais.api.protobuf.CreateServiceAccountTokenResponse + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_serviceaccounts_proto_depIdxs = []int32{ + 4, // 0: nais.api.protobuf.CreateServiceAccountTokenRequest.expires_at:type_name -> google.protobuf.Timestamp + 0, // 1: nais.api.protobuf.ServiceAccounts.Create:input_type -> nais.api.protobuf.CreateServiceAccountRequest + 2, // 2: nais.api.protobuf.ServiceAccounts.CreateToken:input_type -> nais.api.protobuf.CreateServiceAccountTokenRequest + 1, // 3: nais.api.protobuf.ServiceAccounts.Create:output_type -> nais.api.protobuf.CreateServiceAccountResponse + 3, // 4: nais.api.protobuf.ServiceAccounts.CreateToken:output_type -> nais.api.protobuf.CreateServiceAccountTokenResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_serviceaccounts_proto_init() } +func file_serviceaccounts_proto_init() { + if File_serviceaccounts_proto != nil { + return + } + file_serviceaccounts_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_serviceaccounts_proto_rawDesc), len(file_serviceaccounts_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_serviceaccounts_proto_goTypes, + DependencyIndexes: file_serviceaccounts_proto_depIdxs, + MessageInfos: file_serviceaccounts_proto_msgTypes, + }.Build() + File_serviceaccounts_proto = out.File + file_serviceaccounts_proto_goTypes = nil + file_serviceaccounts_proto_depIdxs = nil +} diff --git a/pkg/apiclient/protoapi/serviceaccounts_grpc.pb.go b/pkg/apiclient/protoapi/serviceaccounts_grpc.pb.go new file mode 100644 index 000000000..876e7ae00 --- /dev/null +++ b/pkg/apiclient/protoapi/serviceaccounts_grpc.pb.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.3 +// source: serviceaccounts.proto + +package protoapi + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ServiceAccounts_Create_FullMethodName = "/nais.api.protobuf.ServiceAccounts/Create" + ServiceAccounts_CreateToken_FullMethodName = "/nais.api.protobuf.ServiceAccounts/CreateToken" +) + +// ServiceAccountsClient is the client API for ServiceAccounts service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ServiceAccountsClient interface { + Create(ctx context.Context, in *CreateServiceAccountRequest, opts ...grpc.CallOption) (*CreateServiceAccountResponse, error) + CreateToken(ctx context.Context, in *CreateServiceAccountTokenRequest, opts ...grpc.CallOption) (*CreateServiceAccountTokenResponse, error) +} + +type serviceAccountsClient struct { + cc grpc.ClientConnInterface +} + +func NewServiceAccountsClient(cc grpc.ClientConnInterface) ServiceAccountsClient { + return &serviceAccountsClient{cc} +} + +func (c *serviceAccountsClient) Create(ctx context.Context, in *CreateServiceAccountRequest, opts ...grpc.CallOption) (*CreateServiceAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateServiceAccountResponse) + err := c.cc.Invoke(ctx, ServiceAccounts_Create_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceAccountsClient) CreateToken(ctx context.Context, in *CreateServiceAccountTokenRequest, opts ...grpc.CallOption) (*CreateServiceAccountTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateServiceAccountTokenResponse) + err := c.cc.Invoke(ctx, ServiceAccounts_CreateToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ServiceAccountsServer is the server API for ServiceAccounts service. +// All implementations must embed UnimplementedServiceAccountsServer +// for forward compatibility. +type ServiceAccountsServer interface { + Create(context.Context, *CreateServiceAccountRequest) (*CreateServiceAccountResponse, error) + CreateToken(context.Context, *CreateServiceAccountTokenRequest) (*CreateServiceAccountTokenResponse, error) + mustEmbedUnimplementedServiceAccountsServer() +} + +// UnimplementedServiceAccountsServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedServiceAccountsServer struct{} + +func (UnimplementedServiceAccountsServer) Create(context.Context, *CreateServiceAccountRequest) (*CreateServiceAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedServiceAccountsServer) CreateToken(context.Context, *CreateServiceAccountTokenRequest) (*CreateServiceAccountTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateToken not implemented") +} +func (UnimplementedServiceAccountsServer) mustEmbedUnimplementedServiceAccountsServer() {} +func (UnimplementedServiceAccountsServer) testEmbeddedByValue() {} + +// UnsafeServiceAccountsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ServiceAccountsServer will +// result in compilation errors. +type UnsafeServiceAccountsServer interface { + mustEmbedUnimplementedServiceAccountsServer() +} + +func RegisterServiceAccountsServer(s grpc.ServiceRegistrar, srv ServiceAccountsServer) { + // If the following call pancis, it indicates UnimplementedServiceAccountsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ServiceAccounts_ServiceDesc, srv) +} + +func _ServiceAccounts_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceAccountsServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceAccounts_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceAccountsServer).Create(ctx, req.(*CreateServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceAccounts_CreateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateServiceAccountTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceAccountsServer).CreateToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceAccounts_CreateToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceAccountsServer).CreateToken(ctx, req.(*CreateServiceAccountTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ServiceAccounts_ServiceDesc is the grpc.ServiceDesc for ServiceAccounts service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ServiceAccounts_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nais.api.protobuf.ServiceAccounts", + HandlerType: (*ServiceAccountsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _ServiceAccounts_Create_Handler, + }, + { + MethodName: "CreateToken", + Handler: _ServiceAccounts_CreateToken_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "serviceaccounts.proto", +} diff --git a/pkg/apiclient/protoapi/serviceaccounts_protoopaque.pb.go b/pkg/apiclient/protoapi/serviceaccounts_protoopaque.pb.go new file mode 100644 index 000000000..7bae59665 --- /dev/null +++ b/pkg/apiclient/protoapi/serviceaccounts_protoopaque.pb.go @@ -0,0 +1,485 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc v5.29.3 +// source: serviceaccounts.proto + +//go:build protoopaque + +package protoapi + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateServiceAccountRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_TeamSlug string `protobuf:"bytes,1,opt,name=team_slug,json=teamSlug,proto3"` + xxx_hidden_Name string `protobuf:"bytes,2,opt,name=name,proto3"` + xxx_hidden_Description string `protobuf:"bytes,3,opt,name=description,proto3"` + xxx_hidden_RoleName string `protobuf:"bytes,4,opt,name=role_name,json=roleName,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateServiceAccountRequest) Reset() { + *x = CreateServiceAccountRequest{} + mi := &file_serviceaccounts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateServiceAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateServiceAccountRequest) ProtoMessage() {} + +func (x *CreateServiceAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_serviceaccounts_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateServiceAccountRequest) GetTeamSlug() string { + if x != nil { + return x.xxx_hidden_TeamSlug + } + return "" +} + +func (x *CreateServiceAccountRequest) GetName() string { + if x != nil { + return x.xxx_hidden_Name + } + return "" +} + +func (x *CreateServiceAccountRequest) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *CreateServiceAccountRequest) GetRoleName() string { + if x != nil { + return x.xxx_hidden_RoleName + } + return "" +} + +func (x *CreateServiceAccountRequest) SetTeamSlug(v string) { + x.xxx_hidden_TeamSlug = v +} + +func (x *CreateServiceAccountRequest) SetName(v string) { + x.xxx_hidden_Name = v +} + +func (x *CreateServiceAccountRequest) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *CreateServiceAccountRequest) SetRoleName(v string) { + x.xxx_hidden_RoleName = v +} + +type CreateServiceAccountRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + TeamSlug string + Name string + Description string + RoleName string +} + +func (b0 CreateServiceAccountRequest_builder) Build() *CreateServiceAccountRequest { + m0 := &CreateServiceAccountRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_TeamSlug = b.TeamSlug + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Description = b.Description + x.xxx_hidden_RoleName = b.RoleName + return m0 +} + +type CreateServiceAccountResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Id string `protobuf:"bytes,1,opt,name=id,proto3"` + xxx_hidden_Created bool `protobuf:"varint,2,opt,name=created,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateServiceAccountResponse) Reset() { + *x = CreateServiceAccountResponse{} + mi := &file_serviceaccounts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateServiceAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateServiceAccountResponse) ProtoMessage() {} + +func (x *CreateServiceAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_serviceaccounts_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateServiceAccountResponse) GetId() string { + if x != nil { + return x.xxx_hidden_Id + } + return "" +} + +func (x *CreateServiceAccountResponse) GetCreated() bool { + if x != nil { + return x.xxx_hidden_Created + } + return false +} + +func (x *CreateServiceAccountResponse) SetId(v string) { + x.xxx_hidden_Id = v +} + +func (x *CreateServiceAccountResponse) SetCreated(v bool) { + x.xxx_hidden_Created = v +} + +type CreateServiceAccountResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string + // Whether the service account was created by this call (false if it already + // existed). + Created bool +} + +func (b0 CreateServiceAccountResponse_builder) Build() *CreateServiceAccountResponse { + m0 := &CreateServiceAccountResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Id = b.Id + x.xxx_hidden_Created = b.Created + return m0 +} + +type CreateServiceAccountTokenRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_ServiceAccountId string `protobuf:"bytes,1,opt,name=service_account_id,json=serviceAccountId,proto3"` + xxx_hidden_Name string `protobuf:"bytes,2,opt,name=name,proto3"` + xxx_hidden_Description string `protobuf:"bytes,3,opt,name=description,proto3"` + xxx_hidden_ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3,oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateServiceAccountTokenRequest) Reset() { + *x = CreateServiceAccountTokenRequest{} + mi := &file_serviceaccounts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateServiceAccountTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateServiceAccountTokenRequest) ProtoMessage() {} + +func (x *CreateServiceAccountTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_serviceaccounts_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateServiceAccountTokenRequest) GetServiceAccountId() string { + if x != nil { + return x.xxx_hidden_ServiceAccountId + } + return "" +} + +func (x *CreateServiceAccountTokenRequest) GetName() string { + if x != nil { + return x.xxx_hidden_Name + } + return "" +} + +func (x *CreateServiceAccountTokenRequest) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *CreateServiceAccountTokenRequest) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.xxx_hidden_ExpiresAt + } + return nil +} + +func (x *CreateServiceAccountTokenRequest) SetServiceAccountId(v string) { + x.xxx_hidden_ServiceAccountId = v +} + +func (x *CreateServiceAccountTokenRequest) SetName(v string) { + x.xxx_hidden_Name = v +} + +func (x *CreateServiceAccountTokenRequest) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *CreateServiceAccountTokenRequest) SetExpiresAt(v *timestamppb.Timestamp) { + x.xxx_hidden_ExpiresAt = v +} + +func (x *CreateServiceAccountTokenRequest) HasExpiresAt() bool { + if x == nil { + return false + } + return x.xxx_hidden_ExpiresAt != nil +} + +func (x *CreateServiceAccountTokenRequest) ClearExpiresAt() { + x.xxx_hidden_ExpiresAt = nil +} + +type CreateServiceAccountTokenRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + ServiceAccountId string + Name string + Description string + // Optional expiry. Note: day-granular on the server side. + ExpiresAt *timestamppb.Timestamp +} + +func (b0 CreateServiceAccountTokenRequest_builder) Build() *CreateServiceAccountTokenRequest { + m0 := &CreateServiceAccountTokenRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_ServiceAccountId = b.ServiceAccountId + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Description = b.Description + x.xxx_hidden_ExpiresAt = b.ExpiresAt + return m0 +} + +type CreateServiceAccountTokenResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Id string `protobuf:"bytes,1,opt,name=id,proto3"` + xxx_hidden_Secret string `protobuf:"bytes,2,opt,name=secret,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateServiceAccountTokenResponse) Reset() { + *x = CreateServiceAccountTokenResponse{} + mi := &file_serviceaccounts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateServiceAccountTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateServiceAccountTokenResponse) ProtoMessage() {} + +func (x *CreateServiceAccountTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_serviceaccounts_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateServiceAccountTokenResponse) GetId() string { + if x != nil { + return x.xxx_hidden_Id + } + return "" +} + +func (x *CreateServiceAccountTokenResponse) GetSecret() string { + if x != nil { + return x.xxx_hidden_Secret + } + return "" +} + +func (x *CreateServiceAccountTokenResponse) SetId(v string) { + x.xxx_hidden_Id = v +} + +func (x *CreateServiceAccountTokenResponse) SetSecret(v string) { + x.xxx_hidden_Secret = v +} + +type CreateServiceAccountTokenResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string + // The plaintext token secret. Only returned once. + Secret string +} + +func (b0 CreateServiceAccountTokenResponse_builder) Build() *CreateServiceAccountTokenResponse { + m0 := &CreateServiceAccountTokenResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Id = b.Id + x.xxx_hidden_Secret = b.Secret + return m0 +} + +var File_serviceaccounts_proto protoreflect.FileDescriptor + +var file_serviceaccounts_proto_rawDesc = string([]byte{ + 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x1b, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, + 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x74, 0x65, 0x61, 0x6d, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, + 0x0a, 0x09, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x48, 0x0a, 0x1c, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0xd5, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, + 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, + 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, + 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x22, 0x4b, 0x0a, + 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x32, 0xfa, 0x01, 0x0a, 0x0f, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x6b, + 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x0b, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x2e, 0x6e, 0x61, 0x69, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x61, 0x70, 0x69, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var file_serviceaccounts_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_serviceaccounts_proto_goTypes = []any{ + (*CreateServiceAccountRequest)(nil), // 0: nais.api.protobuf.CreateServiceAccountRequest + (*CreateServiceAccountResponse)(nil), // 1: nais.api.protobuf.CreateServiceAccountResponse + (*CreateServiceAccountTokenRequest)(nil), // 2: nais.api.protobuf.CreateServiceAccountTokenRequest + (*CreateServiceAccountTokenResponse)(nil), // 3: nais.api.protobuf.CreateServiceAccountTokenResponse + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_serviceaccounts_proto_depIdxs = []int32{ + 4, // 0: nais.api.protobuf.CreateServiceAccountTokenRequest.expires_at:type_name -> google.protobuf.Timestamp + 0, // 1: nais.api.protobuf.ServiceAccounts.Create:input_type -> nais.api.protobuf.CreateServiceAccountRequest + 2, // 2: nais.api.protobuf.ServiceAccounts.CreateToken:input_type -> nais.api.protobuf.CreateServiceAccountTokenRequest + 1, // 3: nais.api.protobuf.ServiceAccounts.Create:output_type -> nais.api.protobuf.CreateServiceAccountResponse + 3, // 4: nais.api.protobuf.ServiceAccounts.CreateToken:output_type -> nais.api.protobuf.CreateServiceAccountTokenResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_serviceaccounts_proto_init() } +func file_serviceaccounts_proto_init() { + if File_serviceaccounts_proto != nil { + return + } + file_serviceaccounts_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_serviceaccounts_proto_rawDesc), len(file_serviceaccounts_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_serviceaccounts_proto_goTypes, + DependencyIndexes: file_serviceaccounts_proto_depIdxs, + MessageInfos: file_serviceaccounts_proto_msgTypes, + }.Build() + File_serviceaccounts_proto = out.File + file_serviceaccounts_proto_goTypes = nil + file_serviceaccounts_proto_depIdxs = nil +} diff --git a/pkg/apiclient/protoapi/teams.pb.go b/pkg/apiclient/protoapi/teams.pb.go index 836acff76..b1d6364ba 100644 --- a/pkg/apiclient/protoapi/teams.pb.go +++ b/pkg/apiclient/protoapi/teams.pb.go @@ -1268,6 +1268,159 @@ func (b0 GetTeamRequest_builder) Build() *GetTeamRequest { return m0 } +type CreateTeamRequest struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"` + Purpose string `protobuf:"bytes,2,opt,name=purpose,proto3" json:"purpose,omitempty"` + SlackChannel string `protobuf:"bytes,3,opt,name=slack_channel,json=slackChannel,proto3" json:"slack_channel,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateTeamRequest) Reset() { + *x = CreateTeamRequest{} + mi := &file_teams_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateTeamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTeamRequest) ProtoMessage() {} + +func (x *CreateTeamRequest) ProtoReflect() protoreflect.Message { + mi := &file_teams_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateTeamRequest) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *CreateTeamRequest) GetPurpose() string { + if x != nil { + return x.Purpose + } + return "" +} + +func (x *CreateTeamRequest) GetSlackChannel() string { + if x != nil { + return x.SlackChannel + } + return "" +} + +func (x *CreateTeamRequest) SetSlug(v string) { + x.Slug = v +} + +func (x *CreateTeamRequest) SetPurpose(v string) { + x.Purpose = v +} + +func (x *CreateTeamRequest) SetSlackChannel(v string) { + x.SlackChannel = v +} + +type CreateTeamRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Slug string + Purpose string + SlackChannel string +} + +func (b0 CreateTeamRequest_builder) Build() *CreateTeamRequest { + m0 := &CreateTeamRequest{} + b, x := &b0, m0 + _, _ = b, x + x.Slug = b.Slug + x.Purpose = b.Purpose + x.SlackChannel = b.SlackChannel + return m0 +} + +type CreateTeamResponse struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Team *Team `protobuf:"bytes,1,opt,name=team,proto3" json:"team,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateTeamResponse) Reset() { + *x = CreateTeamResponse{} + mi := &file_teams_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateTeamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTeamResponse) ProtoMessage() {} + +func (x *CreateTeamResponse) ProtoReflect() protoreflect.Message { + mi := &file_teams_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateTeamResponse) GetTeam() *Team { + if x != nil { + return x.Team + } + return nil +} + +func (x *CreateTeamResponse) SetTeam(v *Team) { + x.Team = v +} + +func (x *CreateTeamResponse) HasTeam() bool { + if x == nil { + return false + } + return x.Team != nil +} + +func (x *CreateTeamResponse) ClearTeam() { + x.Team = nil +} + +type CreateTeamResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Team *Team +} + +func (b0 CreateTeamResponse_builder) Build() *CreateTeamResponse { + m0 := &CreateTeamResponse{} + b, x := &b0, m0 + _, _ = b, x + x.Team = b.Team + return m0 +} + type ListTeamsRequest struct { state protoimpl.MessageState `protogen:"hybrid.v1"` Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` @@ -1278,7 +1431,7 @@ type ListTeamsRequest struct { func (x *ListTeamsRequest) Reset() { *x = ListTeamsRequest{} - mi := &file_teams_proto_msgTypes[14] + mi := &file_teams_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1290,7 +1443,7 @@ func (x *ListTeamsRequest) String() string { func (*ListTeamsRequest) ProtoMessage() {} func (x *ListTeamsRequest) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[14] + mi := &file_teams_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1350,7 +1503,7 @@ type ListForUserByEmailRequest struct { func (x *ListForUserByEmailRequest) Reset() { *x = ListForUserByEmailRequest{} - mi := &file_teams_proto_msgTypes[15] + mi := &file_teams_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1362,7 +1515,7 @@ func (x *ListForUserByEmailRequest) String() string { func (*ListForUserByEmailRequest) ProtoMessage() {} func (x *ListForUserByEmailRequest) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[15] + mi := &file_teams_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1434,7 +1587,7 @@ type ListTeamsResponse struct { func (x *ListTeamsResponse) Reset() { *x = ListTeamsResponse{} - mi := &file_teams_proto_msgTypes[16] + mi := &file_teams_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1446,7 +1599,7 @@ func (x *ListTeamsResponse) String() string { func (*ListTeamsResponse) ProtoMessage() {} func (x *ListTeamsResponse) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[16] + mi := &file_teams_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1517,7 +1670,7 @@ type ListTeamMembersRequest struct { func (x *ListTeamMembersRequest) Reset() { *x = ListTeamMembersRequest{} - mi := &file_teams_proto_msgTypes[17] + mi := &file_teams_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1529,7 +1682,7 @@ func (x *ListTeamMembersRequest) String() string { func (*ListTeamMembersRequest) ProtoMessage() {} func (x *ListTeamMembersRequest) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[17] + mi := &file_teams_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1601,7 +1754,7 @@ type ListTeamMembersResponse struct { func (x *ListTeamMembersResponse) Reset() { *x = ListTeamMembersResponse{} - mi := &file_teams_proto_msgTypes[18] + mi := &file_teams_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1613,7 +1766,7 @@ func (x *ListTeamMembersResponse) String() string { func (*ListTeamMembersResponse) ProtoMessage() {} func (x *ListTeamMembersResponse) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[18] + mi := &file_teams_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1682,7 +1835,7 @@ type TeamMember struct { func (x *TeamMember) Reset() { *x = TeamMember{} - mi := &file_teams_proto_msgTypes[19] + mi := &file_teams_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1694,7 +1847,7 @@ func (x *TeamMember) String() string { func (*TeamMember) ProtoMessage() {} func (x *TeamMember) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[19] + mi := &file_teams_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1751,7 +1904,7 @@ type IsRepositoryAuthorizedRequest struct { func (x *IsRepositoryAuthorizedRequest) Reset() { *x = IsRepositoryAuthorizedRequest{} - mi := &file_teams_proto_msgTypes[20] + mi := &file_teams_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1763,7 +1916,7 @@ func (x *IsRepositoryAuthorizedRequest) String() string { func (*IsRepositoryAuthorizedRequest) ProtoMessage() {} func (x *IsRepositoryAuthorizedRequest) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[20] + mi := &file_teams_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1821,7 +1974,7 @@ type IsRepositoryAuthorizedResponse struct { func (x *IsRepositoryAuthorizedResponse) Reset() { *x = IsRepositoryAuthorizedResponse{} - mi := &file_teams_proto_msgTypes[21] + mi := &file_teams_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1833,7 +1986,7 @@ func (x *IsRepositoryAuthorizedResponse) String() string { func (*IsRepositoryAuthorizedResponse) ProtoMessage() {} func (x *IsRepositoryAuthorizedResponse) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[21] + mi := &file_teams_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2001,133 +2154,149 @@ var file_teams_proto_rawDesc = string([]byte{ 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x22, - 0x40, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x22, 0x5f, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, - 0x42, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x66, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x72, 0x70, + 0x6f, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, + 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6c, 0x61, 0x63, 0x6b, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x41, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, + 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, + 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x40, 0x0a, 0x10, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x22, 0x7c, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, - 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x61, 0x69, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x22, 0x5a, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x22, 0x88, 0x01, 0x0a, - 0x17, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x65, 0x61, 0x6d, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x38, 0x0a, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x39, 0x0a, 0x0a, 0x54, 0x65, 0x61, 0x6d, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x22, 0x71, 0x0a, 0x1d, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x6c, 0x75, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x53, 0x6c, 0x75, 0x67, - 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x45, 0x0a, 0x1e, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x32, 0x8e, 0x09, 0x0a, - 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6e, 0x61, - 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x6e, 0x61, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x5f, 0x0a, 0x19, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x7c, 0x0a, + 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, + 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5a, 0x0a, 0x16, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x22, 0x88, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x39, 0x0a, 0x0a, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x2b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x6e, - 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x75, 0x66, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x71, 0x0a, + 0x1d, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x04, 0x08, 0x03, 0x10, + 0x04, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x45, 0x0a, 0x1e, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x32, 0xe7, 0x09, 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, + 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4e, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x61, 0x69, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x57, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6e, 0x61, 0x69, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x23, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, + 0x73, 0x65, 0x72, 0x42, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x12, 0x4c, 0x69, 0x73, - 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, - 0x2c, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x42, - 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x07, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, + 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, + 0x0c, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x12, 0x29, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6e, 0x61, - 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x0c, 0x45, 0x6e, 0x76, - 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x6e, 0x61, 0x69, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6e, 0x61, 0x69, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x88, 0x01, 0x0a, - 0x19, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x33, 0x2e, 0x6e, 0x61, 0x69, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa9, 0x01, 0x0a, 0x24, 0x53, 0x65, 0x74, 0x54, - 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x12, 0x3e, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3f, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x24, 0x2e, + 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, - 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x16, - 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x30, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x73, 0x52, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x73, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x1a, 0x5a, - 0x18, 0x2e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x88, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x33, + 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa9, 0x01, 0x0a, 0x24, + 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, + 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, + 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x24, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x7f, 0x0a, 0x16, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x30, 0x2e, 0x6e, 0x61, 0x69, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, + 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6e, + 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, }) -var file_teams_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_teams_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_teams_proto_goTypes = []any{ (*Team)(nil), // 0: nais.api.protobuf.Team (*ListAuthorizedRepositoriesRequest)(nil), // 1: nais.api.protobuf.ListAuthorizedRepositoriesRequest @@ -2143,53 +2312,58 @@ var file_teams_proto_goTypes = []any{ (*TeamEnvironment)(nil), // 11: nais.api.protobuf.TeamEnvironment (*GetTeamResponse)(nil), // 12: nais.api.protobuf.GetTeamResponse (*GetTeamRequest)(nil), // 13: nais.api.protobuf.GetTeamRequest - (*ListTeamsRequest)(nil), // 14: nais.api.protobuf.ListTeamsRequest - (*ListForUserByEmailRequest)(nil), // 15: nais.api.protobuf.ListForUserByEmailRequest - (*ListTeamsResponse)(nil), // 16: nais.api.protobuf.ListTeamsResponse - (*ListTeamMembersRequest)(nil), // 17: nais.api.protobuf.ListTeamMembersRequest - (*ListTeamMembersResponse)(nil), // 18: nais.api.protobuf.ListTeamMembersResponse - (*TeamMember)(nil), // 19: nais.api.protobuf.TeamMember - (*IsRepositoryAuthorizedRequest)(nil), // 20: nais.api.protobuf.IsRepositoryAuthorizedRequest - (*IsRepositoryAuthorizedResponse)(nil), // 21: nais.api.protobuf.IsRepositoryAuthorizedResponse - (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp - (*PageInfo)(nil), // 23: nais.api.protobuf.PageInfo - (*User)(nil), // 24: nais.api.protobuf.User + (*CreateTeamRequest)(nil), // 14: nais.api.protobuf.CreateTeamRequest + (*CreateTeamResponse)(nil), // 15: nais.api.protobuf.CreateTeamResponse + (*ListTeamsRequest)(nil), // 16: nais.api.protobuf.ListTeamsRequest + (*ListForUserByEmailRequest)(nil), // 17: nais.api.protobuf.ListForUserByEmailRequest + (*ListTeamsResponse)(nil), // 18: nais.api.protobuf.ListTeamsResponse + (*ListTeamMembersRequest)(nil), // 19: nais.api.protobuf.ListTeamMembersRequest + (*ListTeamMembersResponse)(nil), // 20: nais.api.protobuf.ListTeamMembersResponse + (*TeamMember)(nil), // 21: nais.api.protobuf.TeamMember + (*IsRepositoryAuthorizedRequest)(nil), // 22: nais.api.protobuf.IsRepositoryAuthorizedRequest + (*IsRepositoryAuthorizedResponse)(nil), // 23: nais.api.protobuf.IsRepositoryAuthorizedResponse + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*PageInfo)(nil), // 25: nais.api.protobuf.PageInfo + (*User)(nil), // 26: nais.api.protobuf.User } var file_teams_proto_depIdxs = []int32{ - 22, // 0: nais.api.protobuf.Team.delete_key_confirmed_at:type_name -> google.protobuf.Timestamp + 24, // 0: nais.api.protobuf.Team.delete_key_confirmed_at:type_name -> google.protobuf.Timestamp 11, // 1: nais.api.protobuf.ListTeamEnvironmentsResponse.nodes:type_name -> nais.api.protobuf.TeamEnvironment - 23, // 2: nais.api.protobuf.ListTeamEnvironmentsResponse.page_info:type_name -> nais.api.protobuf.PageInfo + 25, // 2: nais.api.protobuf.ListTeamEnvironmentsResponse.page_info:type_name -> nais.api.protobuf.PageInfo 0, // 3: nais.api.protobuf.GetTeamResponse.team:type_name -> nais.api.protobuf.Team - 0, // 4: nais.api.protobuf.ListTeamsResponse.nodes:type_name -> nais.api.protobuf.Team - 23, // 5: nais.api.protobuf.ListTeamsResponse.page_info:type_name -> nais.api.protobuf.PageInfo - 19, // 6: nais.api.protobuf.ListTeamMembersResponse.nodes:type_name -> nais.api.protobuf.TeamMember - 23, // 7: nais.api.protobuf.ListTeamMembersResponse.page_info:type_name -> nais.api.protobuf.PageInfo - 24, // 8: nais.api.protobuf.TeamMember.user:type_name -> nais.api.protobuf.User - 1, // 9: nais.api.protobuf.Teams.ListAuthorizedRepositories:input_type -> nais.api.protobuf.ListAuthorizedRepositoriesRequest - 13, // 10: nais.api.protobuf.Teams.Get:input_type -> nais.api.protobuf.GetTeamRequest - 14, // 11: nais.api.protobuf.Teams.List:input_type -> nais.api.protobuf.ListTeamsRequest - 15, // 12: nais.api.protobuf.Teams.ListForUserByEmail:input_type -> nais.api.protobuf.ListForUserByEmailRequest - 17, // 13: nais.api.protobuf.Teams.Members:input_type -> nais.api.protobuf.ListTeamMembersRequest - 9, // 14: nais.api.protobuf.Teams.Environments:input_type -> nais.api.protobuf.ListTeamEnvironmentsRequest - 5, // 15: nais.api.protobuf.Teams.SetTeamExternalReferences:input_type -> nais.api.protobuf.SetTeamExternalReferencesRequest - 7, // 16: nais.api.protobuf.Teams.SetTeamEnvironmentExternalReferences:input_type -> nais.api.protobuf.SetTeamEnvironmentExternalReferencesRequest - 3, // 17: nais.api.protobuf.Teams.Delete:input_type -> nais.api.protobuf.DeleteTeamRequest - 20, // 18: nais.api.protobuf.Teams.IsRepositoryAuthorized:input_type -> nais.api.protobuf.IsRepositoryAuthorizedRequest - 2, // 19: nais.api.protobuf.Teams.ListAuthorizedRepositories:output_type -> nais.api.protobuf.ListAuthorizedRepositoriesResponse - 12, // 20: nais.api.protobuf.Teams.Get:output_type -> nais.api.protobuf.GetTeamResponse - 16, // 21: nais.api.protobuf.Teams.List:output_type -> nais.api.protobuf.ListTeamsResponse - 16, // 22: nais.api.protobuf.Teams.ListForUserByEmail:output_type -> nais.api.protobuf.ListTeamsResponse - 18, // 23: nais.api.protobuf.Teams.Members:output_type -> nais.api.protobuf.ListTeamMembersResponse - 10, // 24: nais.api.protobuf.Teams.Environments:output_type -> nais.api.protobuf.ListTeamEnvironmentsResponse - 6, // 25: nais.api.protobuf.Teams.SetTeamExternalReferences:output_type -> nais.api.protobuf.SetTeamExternalReferencesResponse - 8, // 26: nais.api.protobuf.Teams.SetTeamEnvironmentExternalReferences:output_type -> nais.api.protobuf.SetTeamEnvironmentExternalReferencesResponse - 4, // 27: nais.api.protobuf.Teams.Delete:output_type -> nais.api.protobuf.DeleteTeamResponse - 21, // 28: nais.api.protobuf.Teams.IsRepositoryAuthorized:output_type -> nais.api.protobuf.IsRepositoryAuthorizedResponse - 19, // [19:29] is the sub-list for method output_type - 9, // [9:19] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 0, // 4: nais.api.protobuf.CreateTeamResponse.team:type_name -> nais.api.protobuf.Team + 0, // 5: nais.api.protobuf.ListTeamsResponse.nodes:type_name -> nais.api.protobuf.Team + 25, // 6: nais.api.protobuf.ListTeamsResponse.page_info:type_name -> nais.api.protobuf.PageInfo + 21, // 7: nais.api.protobuf.ListTeamMembersResponse.nodes:type_name -> nais.api.protobuf.TeamMember + 25, // 8: nais.api.protobuf.ListTeamMembersResponse.page_info:type_name -> nais.api.protobuf.PageInfo + 26, // 9: nais.api.protobuf.TeamMember.user:type_name -> nais.api.protobuf.User + 1, // 10: nais.api.protobuf.Teams.ListAuthorizedRepositories:input_type -> nais.api.protobuf.ListAuthorizedRepositoriesRequest + 13, // 11: nais.api.protobuf.Teams.Get:input_type -> nais.api.protobuf.GetTeamRequest + 14, // 12: nais.api.protobuf.Teams.Create:input_type -> nais.api.protobuf.CreateTeamRequest + 16, // 13: nais.api.protobuf.Teams.List:input_type -> nais.api.protobuf.ListTeamsRequest + 17, // 14: nais.api.protobuf.Teams.ListForUserByEmail:input_type -> nais.api.protobuf.ListForUserByEmailRequest + 19, // 15: nais.api.protobuf.Teams.Members:input_type -> nais.api.protobuf.ListTeamMembersRequest + 9, // 16: nais.api.protobuf.Teams.Environments:input_type -> nais.api.protobuf.ListTeamEnvironmentsRequest + 5, // 17: nais.api.protobuf.Teams.SetTeamExternalReferences:input_type -> nais.api.protobuf.SetTeamExternalReferencesRequest + 7, // 18: nais.api.protobuf.Teams.SetTeamEnvironmentExternalReferences:input_type -> nais.api.protobuf.SetTeamEnvironmentExternalReferencesRequest + 3, // 19: nais.api.protobuf.Teams.Delete:input_type -> nais.api.protobuf.DeleteTeamRequest + 22, // 20: nais.api.protobuf.Teams.IsRepositoryAuthorized:input_type -> nais.api.protobuf.IsRepositoryAuthorizedRequest + 2, // 21: nais.api.protobuf.Teams.ListAuthorizedRepositories:output_type -> nais.api.protobuf.ListAuthorizedRepositoriesResponse + 12, // 22: nais.api.protobuf.Teams.Get:output_type -> nais.api.protobuf.GetTeamResponse + 15, // 23: nais.api.protobuf.Teams.Create:output_type -> nais.api.protobuf.CreateTeamResponse + 18, // 24: nais.api.protobuf.Teams.List:output_type -> nais.api.protobuf.ListTeamsResponse + 18, // 25: nais.api.protobuf.Teams.ListForUserByEmail:output_type -> nais.api.protobuf.ListTeamsResponse + 20, // 26: nais.api.protobuf.Teams.Members:output_type -> nais.api.protobuf.ListTeamMembersResponse + 10, // 27: nais.api.protobuf.Teams.Environments:output_type -> nais.api.protobuf.ListTeamEnvironmentsResponse + 6, // 28: nais.api.protobuf.Teams.SetTeamExternalReferences:output_type -> nais.api.protobuf.SetTeamExternalReferencesResponse + 8, // 29: nais.api.protobuf.Teams.SetTeamEnvironmentExternalReferences:output_type -> nais.api.protobuf.SetTeamEnvironmentExternalReferencesResponse + 4, // 30: nais.api.protobuf.Teams.Delete:output_type -> nais.api.protobuf.DeleteTeamResponse + 23, // 31: nais.api.protobuf.Teams.IsRepositoryAuthorized:output_type -> nais.api.protobuf.IsRepositoryAuthorizedResponse + 21, // [21:32] is the sub-list for method output_type + 10, // [10:21] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_teams_proto_init() } @@ -2209,7 +2383,7 @@ func file_teams_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_teams_proto_rawDesc), len(file_teams_proto_rawDesc)), NumEnums: 0, - NumMessages: 22, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apiclient/protoapi/teams_grpc.pb.go b/pkg/apiclient/protoapi/teams_grpc.pb.go index 2a00c4e48..f4206ad5c 100644 --- a/pkg/apiclient/protoapi/teams_grpc.pb.go +++ b/pkg/apiclient/protoapi/teams_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion9 const ( Teams_ListAuthorizedRepositories_FullMethodName = "/nais.api.protobuf.Teams/ListAuthorizedRepositories" Teams_Get_FullMethodName = "/nais.api.protobuf.Teams/Get" + Teams_Create_FullMethodName = "/nais.api.protobuf.Teams/Create" Teams_List_FullMethodName = "/nais.api.protobuf.Teams/List" Teams_ListForUserByEmail_FullMethodName = "/nais.api.protobuf.Teams/ListForUserByEmail" Teams_Members_FullMethodName = "/nais.api.protobuf.Teams/Members" @@ -37,6 +38,7 @@ const ( type TeamsClient interface { ListAuthorizedRepositories(ctx context.Context, in *ListAuthorizedRepositoriesRequest, opts ...grpc.CallOption) (*ListAuthorizedRepositoriesResponse, error) Get(ctx context.Context, in *GetTeamRequest, opts ...grpc.CallOption) (*GetTeamResponse, error) + Create(ctx context.Context, in *CreateTeamRequest, opts ...grpc.CallOption) (*CreateTeamResponse, error) List(ctx context.Context, in *ListTeamsRequest, opts ...grpc.CallOption) (*ListTeamsResponse, error) ListForUserByEmail(ctx context.Context, in *ListForUserByEmailRequest, opts ...grpc.CallOption) (*ListTeamsResponse, error) Members(ctx context.Context, in *ListTeamMembersRequest, opts ...grpc.CallOption) (*ListTeamMembersResponse, error) @@ -75,6 +77,16 @@ func (c *teamsClient) Get(ctx context.Context, in *GetTeamRequest, opts ...grpc. return out, nil } +func (c *teamsClient) Create(ctx context.Context, in *CreateTeamRequest, opts ...grpc.CallOption) (*CreateTeamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateTeamResponse) + err := c.cc.Invoke(ctx, Teams_Create_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *teamsClient) List(ctx context.Context, in *ListTeamsRequest, opts ...grpc.CallOption) (*ListTeamsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListTeamsResponse) @@ -161,6 +173,7 @@ func (c *teamsClient) IsRepositoryAuthorized(ctx context.Context, in *IsReposito type TeamsServer interface { ListAuthorizedRepositories(context.Context, *ListAuthorizedRepositoriesRequest) (*ListAuthorizedRepositoriesResponse, error) Get(context.Context, *GetTeamRequest) (*GetTeamResponse, error) + Create(context.Context, *CreateTeamRequest) (*CreateTeamResponse, error) List(context.Context, *ListTeamsRequest) (*ListTeamsResponse, error) ListForUserByEmail(context.Context, *ListForUserByEmailRequest) (*ListTeamsResponse, error) Members(context.Context, *ListTeamMembersRequest) (*ListTeamMembersResponse, error) @@ -185,6 +198,9 @@ func (UnimplementedTeamsServer) ListAuthorizedRepositories(context.Context, *Lis func (UnimplementedTeamsServer) Get(context.Context, *GetTeamRequest) (*GetTeamResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } +func (UnimplementedTeamsServer) Create(context.Context, *CreateTeamRequest) (*CreateTeamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} func (UnimplementedTeamsServer) List(context.Context, *ListTeamsRequest) (*ListTeamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } @@ -266,6 +282,24 @@ func _Teams_Get_Handler(srv interface{}, ctx context.Context, dec func(interface return interceptor(ctx, in, info, handler) } +func _Teams_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTeamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamsServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Teams_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamsServer).Create(ctx, req.(*CreateTeamRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Teams_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListTeamsRequest) if err := dec(in); err != nil { @@ -425,6 +459,10 @@ var Teams_ServiceDesc = grpc.ServiceDesc{ MethodName: "Get", Handler: _Teams_Get_Handler, }, + { + MethodName: "Create", + Handler: _Teams_Create_Handler, + }, { MethodName: "List", Handler: _Teams_List_Handler, diff --git a/pkg/apiclient/protoapi/teams_protoopaque.pb.go b/pkg/apiclient/protoapi/teams_protoopaque.pb.go index fc82b0c45..f68ebea07 100644 --- a/pkg/apiclient/protoapi/teams_protoopaque.pb.go +++ b/pkg/apiclient/protoapi/teams_protoopaque.pb.go @@ -1373,6 +1373,159 @@ func (b0 GetTeamRequest_builder) Build() *GetTeamRequest { return m0 } +type CreateTeamRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Slug string `protobuf:"bytes,1,opt,name=slug,proto3"` + xxx_hidden_Purpose string `protobuf:"bytes,2,opt,name=purpose,proto3"` + xxx_hidden_SlackChannel string `protobuf:"bytes,3,opt,name=slack_channel,json=slackChannel,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateTeamRequest) Reset() { + *x = CreateTeamRequest{} + mi := &file_teams_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateTeamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTeamRequest) ProtoMessage() {} + +func (x *CreateTeamRequest) ProtoReflect() protoreflect.Message { + mi := &file_teams_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateTeamRequest) GetSlug() string { + if x != nil { + return x.xxx_hidden_Slug + } + return "" +} + +func (x *CreateTeamRequest) GetPurpose() string { + if x != nil { + return x.xxx_hidden_Purpose + } + return "" +} + +func (x *CreateTeamRequest) GetSlackChannel() string { + if x != nil { + return x.xxx_hidden_SlackChannel + } + return "" +} + +func (x *CreateTeamRequest) SetSlug(v string) { + x.xxx_hidden_Slug = v +} + +func (x *CreateTeamRequest) SetPurpose(v string) { + x.xxx_hidden_Purpose = v +} + +func (x *CreateTeamRequest) SetSlackChannel(v string) { + x.xxx_hidden_SlackChannel = v +} + +type CreateTeamRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Slug string + Purpose string + SlackChannel string +} + +func (b0 CreateTeamRequest_builder) Build() *CreateTeamRequest { + m0 := &CreateTeamRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Slug = b.Slug + x.xxx_hidden_Purpose = b.Purpose + x.xxx_hidden_SlackChannel = b.SlackChannel + return m0 +} + +type CreateTeamResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Team *Team `protobuf:"bytes,1,opt,name=team,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateTeamResponse) Reset() { + *x = CreateTeamResponse{} + mi := &file_teams_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateTeamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTeamResponse) ProtoMessage() {} + +func (x *CreateTeamResponse) ProtoReflect() protoreflect.Message { + mi := &file_teams_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CreateTeamResponse) GetTeam() *Team { + if x != nil { + return x.xxx_hidden_Team + } + return nil +} + +func (x *CreateTeamResponse) SetTeam(v *Team) { + x.xxx_hidden_Team = v +} + +func (x *CreateTeamResponse) HasTeam() bool { + if x == nil { + return false + } + return x.xxx_hidden_Team != nil +} + +func (x *CreateTeamResponse) ClearTeam() { + x.xxx_hidden_Team = nil +} + +type CreateTeamResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Team *Team +} + +func (b0 CreateTeamResponse_builder) Build() *CreateTeamResponse { + m0 := &CreateTeamResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Team = b.Team + return m0 +} + type ListTeamsRequest struct { state protoimpl.MessageState `protogen:"opaque.v1"` xxx_hidden_Limit int64 `protobuf:"varint,1,opt,name=limit,proto3"` @@ -1383,7 +1536,7 @@ type ListTeamsRequest struct { func (x *ListTeamsRequest) Reset() { *x = ListTeamsRequest{} - mi := &file_teams_proto_msgTypes[14] + mi := &file_teams_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1395,7 +1548,7 @@ func (x *ListTeamsRequest) String() string { func (*ListTeamsRequest) ProtoMessage() {} func (x *ListTeamsRequest) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[14] + mi := &file_teams_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1455,7 +1608,7 @@ type ListForUserByEmailRequest struct { func (x *ListForUserByEmailRequest) Reset() { *x = ListForUserByEmailRequest{} - mi := &file_teams_proto_msgTypes[15] + mi := &file_teams_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1467,7 +1620,7 @@ func (x *ListForUserByEmailRequest) String() string { func (*ListForUserByEmailRequest) ProtoMessage() {} func (x *ListForUserByEmailRequest) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[15] + mi := &file_teams_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1539,7 +1692,7 @@ type ListTeamsResponse struct { func (x *ListTeamsResponse) Reset() { *x = ListTeamsResponse{} - mi := &file_teams_proto_msgTypes[16] + mi := &file_teams_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1551,7 +1704,7 @@ func (x *ListTeamsResponse) String() string { func (*ListTeamsResponse) ProtoMessage() {} func (x *ListTeamsResponse) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[16] + mi := &file_teams_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1624,7 +1777,7 @@ type ListTeamMembersRequest struct { func (x *ListTeamMembersRequest) Reset() { *x = ListTeamMembersRequest{} - mi := &file_teams_proto_msgTypes[17] + mi := &file_teams_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1636,7 +1789,7 @@ func (x *ListTeamMembersRequest) String() string { func (*ListTeamMembersRequest) ProtoMessage() {} func (x *ListTeamMembersRequest) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[17] + mi := &file_teams_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1708,7 +1861,7 @@ type ListTeamMembersResponse struct { func (x *ListTeamMembersResponse) Reset() { *x = ListTeamMembersResponse{} - mi := &file_teams_proto_msgTypes[18] + mi := &file_teams_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1720,7 +1873,7 @@ func (x *ListTeamMembersResponse) String() string { func (*ListTeamMembersResponse) ProtoMessage() {} func (x *ListTeamMembersResponse) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[18] + mi := &file_teams_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1791,7 +1944,7 @@ type TeamMember struct { func (x *TeamMember) Reset() { *x = TeamMember{} - mi := &file_teams_proto_msgTypes[19] + mi := &file_teams_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1803,7 +1956,7 @@ func (x *TeamMember) String() string { func (*TeamMember) ProtoMessage() {} func (x *TeamMember) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[19] + mi := &file_teams_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1860,7 +2013,7 @@ type IsRepositoryAuthorizedRequest struct { func (x *IsRepositoryAuthorizedRequest) Reset() { *x = IsRepositoryAuthorizedRequest{} - mi := &file_teams_proto_msgTypes[20] + mi := &file_teams_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1872,7 +2025,7 @@ func (x *IsRepositoryAuthorizedRequest) String() string { func (*IsRepositoryAuthorizedRequest) ProtoMessage() {} func (x *IsRepositoryAuthorizedRequest) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[20] + mi := &file_teams_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1930,7 +2083,7 @@ type IsRepositoryAuthorizedResponse struct { func (x *IsRepositoryAuthorizedResponse) Reset() { *x = IsRepositoryAuthorizedResponse{} - mi := &file_teams_proto_msgTypes[21] + mi := &file_teams_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1942,7 +2095,7 @@ func (x *IsRepositoryAuthorizedResponse) String() string { func (*IsRepositoryAuthorizedResponse) ProtoMessage() {} func (x *IsRepositoryAuthorizedResponse) ProtoReflect() protoreflect.Message { - mi := &file_teams_proto_msgTypes[21] + mi := &file_teams_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2110,133 +2263,149 @@ var file_teams_proto_rawDesc = string([]byte{ 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x22, - 0x40, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x22, 0x5f, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, - 0x42, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x66, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x72, 0x70, + 0x6f, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, + 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6c, 0x61, 0x63, 0x6b, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x41, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, + 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, + 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x40, 0x0a, 0x10, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x22, 0x7c, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, - 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x61, 0x69, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x22, 0x5a, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x22, 0x88, 0x01, 0x0a, - 0x17, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x65, 0x61, 0x6d, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x38, 0x0a, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x39, 0x0a, 0x0a, 0x54, 0x65, 0x61, 0x6d, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x22, 0x71, 0x0a, 0x1d, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x6c, 0x75, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x53, 0x6c, 0x75, 0x67, - 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x45, 0x0a, 0x1e, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x32, 0x8e, 0x09, 0x0a, - 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6e, 0x61, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x5f, 0x0a, 0x19, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x7c, 0x0a, + 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, + 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5a, 0x0a, 0x16, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x22, 0x88, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x6e, 0x61, - 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x39, 0x0a, 0x0a, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x2b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x6e, - 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x75, 0x66, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x71, 0x0a, + 0x1d, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x74, 0x65, 0x61, 0x6d, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x04, 0x08, 0x03, 0x10, + 0x04, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x45, 0x0a, 0x1e, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x32, 0xe7, 0x09, 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, + 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4e, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x61, 0x69, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x57, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6e, 0x61, 0x69, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x23, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, + 0x73, 0x65, 0x72, 0x42, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x12, 0x4c, 0x69, 0x73, - 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, - 0x2c, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x42, - 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x07, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, + 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, + 0x0c, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x12, 0x29, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6e, 0x61, - 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x0c, 0x45, 0x6e, 0x76, - 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x6e, 0x61, 0x69, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6e, 0x61, 0x69, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x88, 0x01, 0x0a, - 0x19, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x33, 0x2e, 0x6e, 0x61, 0x69, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa9, 0x01, 0x0a, 0x24, 0x53, 0x65, 0x74, 0x54, - 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x12, 0x3e, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3f, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x24, 0x2e, + 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, - 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x16, - 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x30, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x73, 0x52, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x73, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x1a, 0x5a, - 0x18, 0x2e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x88, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x33, + 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa9, 0x01, 0x0a, 0x24, + 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, + 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, + 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x24, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6e, 0x61, 0x69, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x7f, 0x0a, 0x16, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x30, 0x2e, 0x6e, 0x61, 0x69, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, + 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6e, + 0x61, 0x69, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x49, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, }) -var file_teams_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_teams_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_teams_proto_goTypes = []any{ (*Team)(nil), // 0: nais.api.protobuf.Team (*ListAuthorizedRepositoriesRequest)(nil), // 1: nais.api.protobuf.ListAuthorizedRepositoriesRequest @@ -2252,53 +2421,58 @@ var file_teams_proto_goTypes = []any{ (*TeamEnvironment)(nil), // 11: nais.api.protobuf.TeamEnvironment (*GetTeamResponse)(nil), // 12: nais.api.protobuf.GetTeamResponse (*GetTeamRequest)(nil), // 13: nais.api.protobuf.GetTeamRequest - (*ListTeamsRequest)(nil), // 14: nais.api.protobuf.ListTeamsRequest - (*ListForUserByEmailRequest)(nil), // 15: nais.api.protobuf.ListForUserByEmailRequest - (*ListTeamsResponse)(nil), // 16: nais.api.protobuf.ListTeamsResponse - (*ListTeamMembersRequest)(nil), // 17: nais.api.protobuf.ListTeamMembersRequest - (*ListTeamMembersResponse)(nil), // 18: nais.api.protobuf.ListTeamMembersResponse - (*TeamMember)(nil), // 19: nais.api.protobuf.TeamMember - (*IsRepositoryAuthorizedRequest)(nil), // 20: nais.api.protobuf.IsRepositoryAuthorizedRequest - (*IsRepositoryAuthorizedResponse)(nil), // 21: nais.api.protobuf.IsRepositoryAuthorizedResponse - (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp - (*PageInfo)(nil), // 23: nais.api.protobuf.PageInfo - (*User)(nil), // 24: nais.api.protobuf.User + (*CreateTeamRequest)(nil), // 14: nais.api.protobuf.CreateTeamRequest + (*CreateTeamResponse)(nil), // 15: nais.api.protobuf.CreateTeamResponse + (*ListTeamsRequest)(nil), // 16: nais.api.protobuf.ListTeamsRequest + (*ListForUserByEmailRequest)(nil), // 17: nais.api.protobuf.ListForUserByEmailRequest + (*ListTeamsResponse)(nil), // 18: nais.api.protobuf.ListTeamsResponse + (*ListTeamMembersRequest)(nil), // 19: nais.api.protobuf.ListTeamMembersRequest + (*ListTeamMembersResponse)(nil), // 20: nais.api.protobuf.ListTeamMembersResponse + (*TeamMember)(nil), // 21: nais.api.protobuf.TeamMember + (*IsRepositoryAuthorizedRequest)(nil), // 22: nais.api.protobuf.IsRepositoryAuthorizedRequest + (*IsRepositoryAuthorizedResponse)(nil), // 23: nais.api.protobuf.IsRepositoryAuthorizedResponse + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*PageInfo)(nil), // 25: nais.api.protobuf.PageInfo + (*User)(nil), // 26: nais.api.protobuf.User } var file_teams_proto_depIdxs = []int32{ - 22, // 0: nais.api.protobuf.Team.delete_key_confirmed_at:type_name -> google.protobuf.Timestamp + 24, // 0: nais.api.protobuf.Team.delete_key_confirmed_at:type_name -> google.protobuf.Timestamp 11, // 1: nais.api.protobuf.ListTeamEnvironmentsResponse.nodes:type_name -> nais.api.protobuf.TeamEnvironment - 23, // 2: nais.api.protobuf.ListTeamEnvironmentsResponse.page_info:type_name -> nais.api.protobuf.PageInfo + 25, // 2: nais.api.protobuf.ListTeamEnvironmentsResponse.page_info:type_name -> nais.api.protobuf.PageInfo 0, // 3: nais.api.protobuf.GetTeamResponse.team:type_name -> nais.api.protobuf.Team - 0, // 4: nais.api.protobuf.ListTeamsResponse.nodes:type_name -> nais.api.protobuf.Team - 23, // 5: nais.api.protobuf.ListTeamsResponse.page_info:type_name -> nais.api.protobuf.PageInfo - 19, // 6: nais.api.protobuf.ListTeamMembersResponse.nodes:type_name -> nais.api.protobuf.TeamMember - 23, // 7: nais.api.protobuf.ListTeamMembersResponse.page_info:type_name -> nais.api.protobuf.PageInfo - 24, // 8: nais.api.protobuf.TeamMember.user:type_name -> nais.api.protobuf.User - 1, // 9: nais.api.protobuf.Teams.ListAuthorizedRepositories:input_type -> nais.api.protobuf.ListAuthorizedRepositoriesRequest - 13, // 10: nais.api.protobuf.Teams.Get:input_type -> nais.api.protobuf.GetTeamRequest - 14, // 11: nais.api.protobuf.Teams.List:input_type -> nais.api.protobuf.ListTeamsRequest - 15, // 12: nais.api.protobuf.Teams.ListForUserByEmail:input_type -> nais.api.protobuf.ListForUserByEmailRequest - 17, // 13: nais.api.protobuf.Teams.Members:input_type -> nais.api.protobuf.ListTeamMembersRequest - 9, // 14: nais.api.protobuf.Teams.Environments:input_type -> nais.api.protobuf.ListTeamEnvironmentsRequest - 5, // 15: nais.api.protobuf.Teams.SetTeamExternalReferences:input_type -> nais.api.protobuf.SetTeamExternalReferencesRequest - 7, // 16: nais.api.protobuf.Teams.SetTeamEnvironmentExternalReferences:input_type -> nais.api.protobuf.SetTeamEnvironmentExternalReferencesRequest - 3, // 17: nais.api.protobuf.Teams.Delete:input_type -> nais.api.protobuf.DeleteTeamRequest - 20, // 18: nais.api.protobuf.Teams.IsRepositoryAuthorized:input_type -> nais.api.protobuf.IsRepositoryAuthorizedRequest - 2, // 19: nais.api.protobuf.Teams.ListAuthorizedRepositories:output_type -> nais.api.protobuf.ListAuthorizedRepositoriesResponse - 12, // 20: nais.api.protobuf.Teams.Get:output_type -> nais.api.protobuf.GetTeamResponse - 16, // 21: nais.api.protobuf.Teams.List:output_type -> nais.api.protobuf.ListTeamsResponse - 16, // 22: nais.api.protobuf.Teams.ListForUserByEmail:output_type -> nais.api.protobuf.ListTeamsResponse - 18, // 23: nais.api.protobuf.Teams.Members:output_type -> nais.api.protobuf.ListTeamMembersResponse - 10, // 24: nais.api.protobuf.Teams.Environments:output_type -> nais.api.protobuf.ListTeamEnvironmentsResponse - 6, // 25: nais.api.protobuf.Teams.SetTeamExternalReferences:output_type -> nais.api.protobuf.SetTeamExternalReferencesResponse - 8, // 26: nais.api.protobuf.Teams.SetTeamEnvironmentExternalReferences:output_type -> nais.api.protobuf.SetTeamEnvironmentExternalReferencesResponse - 4, // 27: nais.api.protobuf.Teams.Delete:output_type -> nais.api.protobuf.DeleteTeamResponse - 21, // 28: nais.api.protobuf.Teams.IsRepositoryAuthorized:output_type -> nais.api.protobuf.IsRepositoryAuthorizedResponse - 19, // [19:29] is the sub-list for method output_type - 9, // [9:19] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 0, // 4: nais.api.protobuf.CreateTeamResponse.team:type_name -> nais.api.protobuf.Team + 0, // 5: nais.api.protobuf.ListTeamsResponse.nodes:type_name -> nais.api.protobuf.Team + 25, // 6: nais.api.protobuf.ListTeamsResponse.page_info:type_name -> nais.api.protobuf.PageInfo + 21, // 7: nais.api.protobuf.ListTeamMembersResponse.nodes:type_name -> nais.api.protobuf.TeamMember + 25, // 8: nais.api.protobuf.ListTeamMembersResponse.page_info:type_name -> nais.api.protobuf.PageInfo + 26, // 9: nais.api.protobuf.TeamMember.user:type_name -> nais.api.protobuf.User + 1, // 10: nais.api.protobuf.Teams.ListAuthorizedRepositories:input_type -> nais.api.protobuf.ListAuthorizedRepositoriesRequest + 13, // 11: nais.api.protobuf.Teams.Get:input_type -> nais.api.protobuf.GetTeamRequest + 14, // 12: nais.api.protobuf.Teams.Create:input_type -> nais.api.protobuf.CreateTeamRequest + 16, // 13: nais.api.protobuf.Teams.List:input_type -> nais.api.protobuf.ListTeamsRequest + 17, // 14: nais.api.protobuf.Teams.ListForUserByEmail:input_type -> nais.api.protobuf.ListForUserByEmailRequest + 19, // 15: nais.api.protobuf.Teams.Members:input_type -> nais.api.protobuf.ListTeamMembersRequest + 9, // 16: nais.api.protobuf.Teams.Environments:input_type -> nais.api.protobuf.ListTeamEnvironmentsRequest + 5, // 17: nais.api.protobuf.Teams.SetTeamExternalReferences:input_type -> nais.api.protobuf.SetTeamExternalReferencesRequest + 7, // 18: nais.api.protobuf.Teams.SetTeamEnvironmentExternalReferences:input_type -> nais.api.protobuf.SetTeamEnvironmentExternalReferencesRequest + 3, // 19: nais.api.protobuf.Teams.Delete:input_type -> nais.api.protobuf.DeleteTeamRequest + 22, // 20: nais.api.protobuf.Teams.IsRepositoryAuthorized:input_type -> nais.api.protobuf.IsRepositoryAuthorizedRequest + 2, // 21: nais.api.protobuf.Teams.ListAuthorizedRepositories:output_type -> nais.api.protobuf.ListAuthorizedRepositoriesResponse + 12, // 22: nais.api.protobuf.Teams.Get:output_type -> nais.api.protobuf.GetTeamResponse + 15, // 23: nais.api.protobuf.Teams.Create:output_type -> nais.api.protobuf.CreateTeamResponse + 18, // 24: nais.api.protobuf.Teams.List:output_type -> nais.api.protobuf.ListTeamsResponse + 18, // 25: nais.api.protobuf.Teams.ListForUserByEmail:output_type -> nais.api.protobuf.ListTeamsResponse + 20, // 26: nais.api.protobuf.Teams.Members:output_type -> nais.api.protobuf.ListTeamMembersResponse + 10, // 27: nais.api.protobuf.Teams.Environments:output_type -> nais.api.protobuf.ListTeamEnvironmentsResponse + 6, // 28: nais.api.protobuf.Teams.SetTeamExternalReferences:output_type -> nais.api.protobuf.SetTeamExternalReferencesResponse + 8, // 29: nais.api.protobuf.Teams.SetTeamEnvironmentExternalReferences:output_type -> nais.api.protobuf.SetTeamEnvironmentExternalReferencesResponse + 4, // 30: nais.api.protobuf.Teams.Delete:output_type -> nais.api.protobuf.DeleteTeamResponse + 23, // 31: nais.api.protobuf.Teams.IsRepositoryAuthorized:output_type -> nais.api.protobuf.IsRepositoryAuthorizedResponse + 21, // [21:32] is the sub-list for method output_type + 10, // [10:21] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_teams_proto_init() } @@ -2318,7 +2492,7 @@ func file_teams_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_teams_proto_rawDesc), len(file_teams_proto_rawDesc)), NumEnums: 0, - NumMessages: 22, + NumMessages: 24, NumExtensions: 0, NumServices: 1, },