Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update instance role v1 API (#4210)

Danny Xu87a28b873d78
diff --git a/frontend/src/types/proto/v1/instance_role_service.ts b/frontend/src/types/proto/v1/instance_role_service.ts
index fb0ed2e9b6..1ee0a205d2 100644
--- a/frontend/src/types/proto/v1/instance_role_service.ts
+++ b/frontend/src/types/proto/v1/instance_role_service.ts
@@ -39,7 +39,7 @@ export interface ListRolesRequest {
export interface ListRolesResponse {
/** The roles from the specified request. */
- roles: DatabaseRole[];
+ roles: InstanceRole[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
* If this field is omitted, there are no subsequent pages.
@@ -54,7 +54,7 @@ export interface CreateRoleRequest {
*/
parent: string;
/** The role to create. */
- role?: DatabaseRole;
+ role?: InstanceRole;
}
export interface UpdateRoleRequest {
@@ -64,7 +64,7 @@ export interface UpdateRoleRequest {
* The role's `name`, `environment` and `instance` field is used to identify the role to update.
* Format: environments/{environment}/instances/{instance}/roles/{role name}
*/
- role?: DatabaseRole;
+ role?: InstanceRole;
/** The list of fields to update. */
updateMask?: string[];
}
@@ -86,7 +86,7 @@ export interface UndeleteRoleRequest {
}
/** RoleAttribute is the attribute for role. Docs: https://www.postgresql.org/docs/current/role-attributes.html */
-export interface DatabaseRoleAttribute {
+export interface RoleAttribute {
/** A database superuser bypasses all permission checks, except the right to log in. */
superUser: boolean;
/** A role is given permission to inherit the privileges of roles it is a member of. To create a role without the permission, use "noInherit = true" */
@@ -103,16 +103,16 @@ export interface DatabaseRoleAttribute {
bypassRls: boolean;
}
-/** DatabaseRole is the API message for database role. */
-export interface DatabaseRole {
+/** InstanceRole is the API message for instance role. */
+export interface InstanceRole {
/**
* The name of the role.
* Format: environments/{environment}/instances/{instance}/roles/{role name}
* The role name is the unique name for the role.
*/
name: string;
- /** The role unique name. */
- title: string;
+ /** The role name. It's unique within the instance. */
+ roleName: string;
/** The role password. */
password?:
| string
@@ -126,7 +126,7 @@ export interface DatabaseRole {
| string
| undefined;
/** The role attribute. */
- attribute?: DatabaseRoleAttribute;
+ attribute?: RoleAttribute;
}
function createBaseGetRoleRequest(): GetRoleRequest {
@@ -250,7 +250,7 @@ function createBaseListRolesResponse(): ListRolesResponse {
export const ListRolesResponse = {
encode(message: ListRolesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
for (const v of message.roles) {
- DatabaseRole.encode(v!, writer.uint32(10).fork()).ldelim();
+ InstanceRole.encode(v!, writer.uint32(10).fork()).ldelim();
}
if (message.nextPageToken !== "") {
writer.uint32(18).string(message.nextPageToken);
@@ -266,7 +266,7 @@ export const ListRolesResponse = {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
- message.roles.push(DatabaseRole.decode(reader, reader.uint32()));
+ message.roles.push(InstanceRole.decode(reader, reader.uint32()));
break;
case 2:
message.nextPageToken = reader.string();
@@ -281,7 +281,7 @@ export const ListRolesResponse = {
fromJSON(object: any): ListRolesResponse {
return {
- roles: Array.isArray(object?.roles) ? object.roles.map((e: any) => DatabaseRole.fromJSON(e)) : [],
+ roles: Array.isArray(object?.roles) ? object.roles.map((e: any) => InstanceRole.fromJSON(e)) : [],
nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
};
},
@@ -289,7 +289,7 @@ export const ListRolesResponse = {
toJSON(message: ListRolesResponse): unknown {
const obj: any = {};
if (message.roles) {
- obj.roles = message.roles.map((e) => e ? DatabaseRole.toJSON(e) : undefined);
+ obj.roles = message.roles.map((e) => e ? InstanceRole.toJSON(e) : undefined);
} else {
obj.roles = [];
}
@@ -299,7 +299,7 @@ export const ListRolesResponse = {
fromPartial<I extends Exact<DeepPartial<ListRolesResponse>, I>>(object: I): ListRolesResponse {
const message = createBaseListRolesResponse();
- message.roles = object.roles?.map((e) => DatabaseRole.fromPartial(e)) || [];
+ message.roles = object.roles?.map((e) => InstanceRole.fromPartial(e)) || [];
message.nextPageToken = object.nextPageToken ?? "";
return message;
},
@@ -315,7 +315,7 @@ export const CreateRoleRequest = {
writer.uint32(10).string(message.parent);
}
if (message.role !== undefined) {
- DatabaseRole.encode(message.role, writer.uint32(18).fork()).ldelim();
+ InstanceRole.encode(message.role, writer.uint32(18).fork()).ldelim();
}
return writer;
},
@@ -331,7 +331,7 @@ export const CreateRoleRequest = {
message.parent = reader.string();
break;
case 2:
- message.role = DatabaseRole.decode(reader, reader.uint32());
+ message.role = InstanceRole.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
@@ -344,14 +344,14 @@ export const CreateRoleRequest = {
fromJSON(object: any): CreateRoleRequest {
return {
parent: isSet(object.parent) ? String(object.parent) : "",
- role: isSet(object.role) ? DatabaseRole.fromJSON(object.role) : undefined,
+ role: isSet(object.role) ? InstanceRole.fromJSON(object.role) : undefined,
};
},
toJSON(message: CreateRoleRequest): unknown {
const obj: any = {};
message.parent !== undefined && (obj.parent = message.parent);
- message.role !== undefined && (obj.role = message.role ? DatabaseRole.toJSON(message.role) : undefined);
+ message.role !== undefined && (obj.role = message.role ? InstanceRole.toJSON(message.role) : undefined);
return obj;
},
@@ -359,7 +359,7 @@ export const CreateRoleRequest = {
const message = createBaseCreateRoleRequest();
message.parent = object.parent ?? "";
message.role = (object.role !== undefined && object.role !== null)
- ? DatabaseRole.fromPartial(object.role)
+ ? InstanceRole.fromPartial(object.role)
: undefined;
return message;
},
@@ -372,7 +372,7 @@ function createBaseUpdateRoleRequest(): UpdateRoleRequest {
export const UpdateRoleRequest = {
encode(message: UpdateRoleRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.role !== undefined) {
- DatabaseRole.encode(message.role, writer.uint32(10).fork()).ldelim();
+ InstanceRole.encode(message.role, writer.uint32(10).fork()).ldelim();
}
if (message.updateMask !== undefined) {
FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(18).fork()).ldelim();
@@ -388,7 +388,7 @@ export const UpdateRoleRequest = {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
- message.role = DatabaseRole.decode(reader, reader.uint32());
+ message.role = InstanceRole.decode(reader, reader.uint32());
break;
case 2:
message.updateMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32()));
@@ -403,14 +403,14 @@ export const UpdateRoleRequest = {
fromJSON(object: any): UpdateRoleRequest {
return {
- role: isSet(object.role) ? DatabaseRole.fromJSON(object.role) : undefined,
+ role: isSet(object.role) ? InstanceRole.fromJSON(object.role) : undefined,
updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
};
},
toJSON(message: UpdateRoleRequest): unknown {
const obj: any = {};
- message.role !== undefined && (obj.role = message.role ? DatabaseRole.toJSON(message.role) : undefined);
+ message.role !== undefined && (obj.role = message.role ? InstanceRole.toJSON(message.role) : undefined);
message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
return obj;
},
@@ -418,7 +418,7 @@ export const UpdateRoleRequest = {
fromPartial<I extends Exact<DeepPartial<UpdateRoleRequest>, I>>(object: I): UpdateRoleRequest {
const message = createBaseUpdateRoleRequest();
message.role = (object.role !== undefined && object.role !== null)
- ? DatabaseRole.fromPartial(object.role)
+ ? InstanceRole.fromPartial(object.role)
: undefined;
message.updateMask = object.updateMask ?? undefined;
return message;
@@ -519,7 +519,7 @@ export const UndeleteRoleRequest = {
},
};
-function createBaseDatabaseRoleAttribute(): DatabaseRoleAttribute {
+function createBaseRoleAttribute(): RoleAttribute {
return {
superUser: false,
noInherit: false,
@@ -531,8 +531,8 @@ function createBaseDatabaseRoleAttribute(): DatabaseRoleAttribute {
};
}
-export const DatabaseRoleAttribute = {
- encode(message: DatabaseRoleAttribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const RoleAttribute = {
+ encode(message: RoleAttribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.superUser === true) {
writer.uint32(8).bool(message.superUser);
}
@@ -557,10 +557,10 @@ export const DatabaseRoleAttribute = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): DatabaseRoleAttribute {
+ decode(input: _m0.Reader | Uint8Array, length?: number): RoleAttribute {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseDatabaseRoleAttribute();
+ const message = createBaseRoleAttribute();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -593,7 +593,7 @@ export const DatabaseRoleAttribute = {
return message;
},
- fromJSON(object: any): DatabaseRoleAttribute {
+ fromJSON(object: any): RoleAttribute {
return {
superUser: isSet(object.superUser) ? Boolean(object.superUser) : false,
noInherit: isSet(object.noInherit) ? Boolean(object.noInherit) : false,
@@ -605,7 +605,7 @@ export const DatabaseRoleAttribute = {
};
},
- toJSON(message: DatabaseRoleAttribute): unknown {
+ toJSON(message: RoleAttribute): unknown {
const obj: any = {};
message.superUser !== undefined && (obj.superUser = message.superUser);
message.noInherit !== undefined && (obj.noInherit = message.noInherit);
@@ -617,8 +617,8 @@ export const DatabaseRoleAttribute = {
return obj;
},
- fromPartial<I extends Exact<DeepPartial<DatabaseRoleAttribute>, I>>(object: I): DatabaseRoleAttribute {
- const message = createBaseDatabaseRoleAttribute();
+ fromPartial<I extends Exact<DeepPartial<RoleAttribute>, I>>(object: I): RoleAttribute {
+ const message = createBaseRoleAttribute();
message.superUser = object.superUser ?? false;
message.noInherit = object.noInherit ?? false;
message.createRole = object.createRole ?? false;
@@ -630,10 +630,10 @@ export const DatabaseRoleAttribute = {
},
};
-function createBaseDatabaseRole(): DatabaseRole {
+function createBaseInstanceRole(): InstanceRole {
return {
name: "",
- title: "",
+ roleName: "",
password: undefined,
connectionLimit: undefined,
validUntil: undefined,
@@ -641,13 +641,13 @@ function createBaseDatabaseRole(): DatabaseRole {
};
}
-export const DatabaseRole = {
- encode(message: DatabaseRole, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const InstanceRole = {
+ encode(message: InstanceRole, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
- if (message.title !== "") {
- writer.uint32(18).string(message.title);
+ if (message.roleName !== "") {
+ writer.uint32(18).string(message.roleName);
}
if (message.password !== undefined) {
writer.uint32(26).string(message.password);
@@ -659,15 +659,15 @@ export const DatabaseRole = {
writer.uint32(42).string(message.validUntil);
}
if (message.attribute !== undefined) {
- DatabaseRoleAttribute.encode(message.attribute, writer.uint32(50).fork()).ldelim();
+ RoleAttribute.encode(message.attribute, writer.uint32(50).fork()).ldelim();
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): DatabaseRole {
+ decode(input: _m0.Reader | Uint8Array, length?: number): InstanceRole {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseDatabaseRole();
+ const message = createBaseInstanceRole();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -675,7 +675,7 @@ export const DatabaseRole = {
message.name = reader.string();
break;
case 2:
- message.title = reader.string();
+ message.roleName = reader.string();
break;
case 3:
message.password = reader.string();
@@ -687,7 +687,7 @@ export const DatabaseRole = {
message.validUntil = reader.string();
break;
case 6:
- message.attribute = DatabaseRoleAttribute.decode(reader, reader.uint32());
+ message.attribute = RoleAttribute.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
@@ -697,50 +697,50 @@ export const DatabaseRole = {
return message;
},
- fromJSON(object: any): DatabaseRole {
+ fromJSON(object: any): InstanceRole {
return {
name: isSet(object.name) ? String(object.name) : "",
- title: isSet(object.title) ? String(object.title) : "",
+ roleName: isSet(object.roleName) ? String(object.roleName) : "",
password: isSet(object.password) ? String(object.password) : undefined,
connectionLimit: isSet(object.connectionLimit) ? Number(object.connectionLimit) : undefined,
validUntil: isSet(object.validUntil) ? String(object.validUntil) : undefined,
- attribute: isSet(object.attribute) ? DatabaseRoleAttribute.fromJSON(object.attribute) : undefined,
+ attribute: isSet(object.attribute) ? RoleAttribute.fromJSON(object.attribute) : undefined,
};
},
- toJSON(message: DatabaseRole): unknown {
+ toJSON(message: InstanceRole): unknown {
const obj: any = {};
message.name !== undefined && (obj.name = message.name);
- message.title !== undefined && (obj.title = message.title);
+ message.roleName !== undefined && (obj.roleName = message.roleName);
message.password !== undefined && (obj.password = message.password);
message.connectionLimit !== undefined && (obj.connectionLimit = Math.round(message.connectionLimit));
message.validUntil !== undefined && (obj.validUntil = message.validUntil);
message.attribute !== undefined &&
- (obj.attribute = message.attribute ? DatabaseRoleAttribute.toJSON(message.attribute) : undefined);
+ (obj.attribute = message.attribute ? RoleAttribute.toJSON(message.attribute) : undefined);
return obj;
},
- fromPartial<I extends Exact<DeepPartial<DatabaseRole>, I>>(object: I): DatabaseRole {
- const message = createBaseDatabaseRole();
+ fromPartial<I extends Exact<DeepPartial<InstanceRole>, I>>(object: I): InstanceRole {
+ const message = createBaseInstanceRole();
message.name = object.name ?? "";
- message.title = object.title ?? "";
+ message.roleName = object.roleName ?? "";
message.password = object.password ?? undefined;
message.connectionLimit = object.connectionLimit ?? undefined;
message.validUntil = object.validUntil ?? undefined;
message.attribute = (object.attribute !== undefined && object.attribute !== null)
- ? DatabaseRoleAttribute.fromPartial(object.attribute)
+ ? RoleAttribute.fromPartial(object.attribute)
: undefined;
return message;
},
};
export interface InstanceRoleService {
- GetRole(request: GetRoleRequest): Promise<DatabaseRole>;
+ GetRole(request: GetRoleRequest): Promise<InstanceRole>;
ListRoles(request: ListRolesRequest): Promise<ListRolesResponse>;
- CreateRole(request: CreateRoleRequest): Promise<DatabaseRole>;
- UpdateRole(request: UpdateRoleRequest): Promise<DatabaseRole>;
+ CreateRole(request: CreateRoleRequest): Promise<InstanceRole>;
+ UpdateRole(request: UpdateRoleRequest): Promise<InstanceRole>;
DeleteRole(request: DeleteRoleRequest): Promise<Empty>;
- UndeleteRole(request: UndeleteRoleRequest): Promise<DatabaseRole>;
+ UndeleteRole(request: UndeleteRoleRequest): Promise<InstanceRole>;
}
export class InstanceRoleServiceClientImpl implements InstanceRoleService {
@@ -756,10 +756,10 @@ export class InstanceRoleServiceClientImpl implements InstanceRoleService {
this.DeleteRole = this.DeleteRole.bind(this);
this.UndeleteRole = this.UndeleteRole.bind(this);
}
- GetRole(request: GetRoleRequest): Promise<DatabaseRole> {
+ GetRole(request: GetRoleRequest): Promise<InstanceRole> {
const data = GetRoleRequest.encode(request).finish();
const promise = this.rpc.request(this.service, "GetRole", data);
- return promise.then((data) => DatabaseRole.decode(new _m0.Reader(data)));
+ return promise.then((data) => InstanceRole.decode(new _m0.Reader(data)));
}
ListRoles(request: ListRolesRequest): Promise<ListRolesResponse> {
@@ -768,16 +768,16 @@ export class InstanceRoleServiceClientImpl implements InstanceRoleService {
return promise.then((data) => ListRolesResponse.decode(new _m0.Reader(data)));
}
- CreateRole(request: CreateRoleRequest): Promise<DatabaseRole> {
+ CreateRole(request: CreateRoleRequest): Promise<InstanceRole> {
const data = CreateRoleRequest.encode(request).finish();
const promise = this.rpc.request(this.service, "CreateRole", data);
- return promise.then((data) => DatabaseRole.decode(new _m0.Reader(data)));
+ return promise.then((data) => InstanceRole.decode(new _m0.Reader(data)));
}
- UpdateRole(request: UpdateRoleRequest): Promise<DatabaseRole> {
+ UpdateRole(request: UpdateRoleRequest): Promise<InstanceRole> {
const data = UpdateRoleRequest.encode(request).finish();
const promise = this.rpc.request(this.service, "UpdateRole", data);
- return promise.then((data) => DatabaseRole.decode(new _m0.Reader(data)));
+ return promise.then((data) => InstanceRole.decode(new _m0.Reader(data)));
}
DeleteRole(request: DeleteRoleRequest): Promise<Empty> {
@@ -786,10 +786,10 @@ export class InstanceRoleServiceClientImpl implements InstanceRoleService {
return promise.then((data) => Empty.decode(new _m0.Reader(data)));
}
- UndeleteRole(request: UndeleteRoleRequest): Promise<DatabaseRole> {
+ UndeleteRole(request: UndeleteRoleRequest): Promise<InstanceRole> {
const data = UndeleteRoleRequest.encode(request).finish();
const promise = this.rpc.request(this.service, "UndeleteRole", data);
- return promise.then((data) => DatabaseRole.decode(new _m0.Reader(data)));
+ return promise.then((data) => InstanceRole.decode(new _m0.Reader(data)));
}
}
diff --git a/proto/generated-go/v1/instance_role_service.pb.go b/proto/generated-go/v1/instance_role_service.pb.go
index b4a0953010..ae144d3d20 100644
--- a/proto/generated-go/v1/instance_role_service.pb.go
+++ b/proto/generated-go/v1/instance_role_service.pb.go
@@ -153,7 +153,7 @@ type ListRolesResponse struct {
unknownFields protoimpl.UnknownFields
// The roles from the specified request.
- Roles []*DatabaseRole `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
+ Roles []*InstanceRole `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
@@ -191,7 +191,7 @@ func (*ListRolesResponse) Descriptor() ([]byte, []int) {
return file_v1_instance_role_service_proto_rawDescGZIP(), []int{2}
}
-func (x *ListRolesResponse) GetRoles() []*DatabaseRole {
+func (x *ListRolesResponse) GetRoles() []*InstanceRole {
if x != nil {
return x.Roles
}
@@ -214,7 +214,7 @@ type CreateRoleRequest struct {
// Format: environments/{environment}/instances/{instance}
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The role to create.
- Role *DatabaseRole `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
+ Role *InstanceRole `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
}
func (x *CreateRoleRequest) Reset() {
@@ -256,7 +256,7 @@ func (x *CreateRoleRequest) GetParent() string {
return ""
}
-func (x *CreateRoleRequest) GetRole() *DatabaseRole {
+func (x *CreateRoleRequest) GetRole() *InstanceRole {
if x != nil {
return x.Role
}
@@ -272,7 +272,7 @@ type UpdateRoleRequest struct {
//
// The role's `name`, `environment` and `instance` field is used to identify the role to update.
// Format: environments/{environment}/instances/{instance}/roles/{role name}
- Role *DatabaseRole `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
+ Role *InstanceRole `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
// The list of fields to update.
UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
@@ -309,7 +309,7 @@ func (*UpdateRoleRequest) Descriptor() ([]byte, []int) {
return file_v1_instance_role_service_proto_rawDescGZIP(), []int{4}
}
-func (x *UpdateRoleRequest) GetRole() *DatabaseRole {
+func (x *UpdateRoleRequest) GetRole() *InstanceRole {
if x != nil {
return x.Role
}
@@ -422,7 +422,7 @@ func (x *UndeleteRoleRequest) GetName() string {
}
// RoleAttribute is the attribute for role. Docs: https://www.postgresql.org/docs/current/role-attributes.html
-type DatabaseRoleAttribute struct {
+type RoleAttribute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -443,8 +443,8 @@ type DatabaseRoleAttribute struct {
BypassRls bool `protobuf:"varint,7,opt,name=bypass_rls,json=bypassRls,proto3" json:"bypass_rls,omitempty"`
}
-func (x *DatabaseRoleAttribute) Reset() {
- *x = DatabaseRoleAttribute{}
+func (x *RoleAttribute) Reset() {
+ *x = RoleAttribute{}
if protoimpl.UnsafeEnabled {
mi := &file_v1_instance_role_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -452,13 +452,13 @@ func (x *DatabaseRoleAttribute) Reset() {
}
}
-func (x *DatabaseRoleAttribute) String() string {
+func (x *RoleAttribute) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DatabaseRoleAttribute) ProtoMessage() {}
+func (*RoleAttribute) ProtoMessage() {}
-func (x *DatabaseRoleAttribute) ProtoReflect() protoreflect.Message {
+func (x *RoleAttribute) ProtoReflect() protoreflect.Message {
mi := &file_v1_instance_role_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -470,62 +470,62 @@ func (x *DatabaseRoleAttribute) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DatabaseRoleAttribute.ProtoReflect.Descriptor instead.
-func (*DatabaseRoleAttribute) Descriptor() ([]byte, []int) {
+// Deprecated: Use RoleAttribute.ProtoReflect.Descriptor instead.
+func (*RoleAttribute) Descriptor() ([]byte, []int) {
return file_v1_instance_role_service_proto_rawDescGZIP(), []int{7}
}
-func (x *DatabaseRoleAttribute) GetSuperUser() bool {
+func (x *RoleAttribute) GetSuperUser() bool {
if x != nil {
return x.SuperUser
}
return false
}
-func (x *DatabaseRoleAttribute) GetNoInherit() bool {
+func (x *RoleAttribute) GetNoInherit() bool {
if x != nil {
return x.NoInherit
}
return false
}
-func (x *DatabaseRoleAttribute) GetCreateRole() bool {
+func (x *RoleAttribute) GetCreateRole() bool {
if x != nil {
return x.CreateRole
}
return false
}
-func (x *DatabaseRoleAttribute) GetCreateDb() bool {
+func (x *RoleAttribute) GetCreateDb() bool {
if x != nil {
return x.CreateDb
}
return false
}
-func (x *DatabaseRoleAttribute) GetCanLogin() bool {
+func (x *RoleAttribute) GetCanLogin() bool {
if x != nil {
return x.CanLogin
}
return false
}
-func (x *DatabaseRoleAttribute) GetReplication() bool {
+func (x *RoleAttribute) GetReplication() bool {
if x != nil {
return x.Replication
}
return false
}
-func (x *DatabaseRoleAttribute) GetBypassRls() bool {
+func (x *RoleAttribute) GetBypassRls() bool {
if x != nil {
return x.BypassRls
}
return false
}
-// DatabaseRole is the API message for database role.
-type DatabaseRole struct {
+// InstanceRole is the API message for instance role.
+type InstanceRole struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -534,8 +534,8 @@ type DatabaseRole struct {
// Format: environments/{environment}/instances/{instance}/roles/{role name}
// The role name is the unique name for the role.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The role unique name.
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ // The role name. It's unique within the instance.
+ RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"`
// The role password.
Password *string `protobuf:"bytes,3,opt,name=password,proto3,oneof" json:"password,omitempty"`
// The connection count limit for this role.
@@ -543,11 +543,11 @@ type DatabaseRole struct {
// The expiration for the role's password.
ValidUntil *string `protobuf:"bytes,5,opt,name=valid_until,json=validUntil,proto3,oneof" json:"valid_until,omitempty"`
// The role attribute.
- Attribute *DatabaseRoleAttribute `protobuf:"bytes,6,opt,name=attribute,proto3" json:"attribute,omitempty"`
+ Attribute *RoleAttribute `protobuf:"bytes,6,opt,name=attribute,proto3" json:"attribute,omitempty"`
}
-func (x *DatabaseRole) Reset() {
- *x = DatabaseRole{}
+func (x *InstanceRole) Reset() {
+ *x = InstanceRole{}
if protoimpl.UnsafeEnabled {
mi := &file_v1_instance_role_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -555,13 +555,13 @@ func (x *DatabaseRole) Reset() {
}
}
-func (x *DatabaseRole) String() string {
+func (x *InstanceRole) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DatabaseRole) ProtoMessage() {}
+func (*InstanceRole) ProtoMessage() {}
-func (x *DatabaseRole) ProtoReflect() protoreflect.Message {
+func (x *InstanceRole) ProtoReflect() protoreflect.Message {
mi := &file_v1_instance_role_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -573,47 +573,47 @@ func (x *DatabaseRole) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DatabaseRole.ProtoReflect.Descriptor instead.
-func (*DatabaseRole) Descriptor() ([]byte, []int) {
+// Deprecated: Use InstanceRole.ProtoReflect.Descriptor instead.
+func (*InstanceRole) Descriptor() ([]byte, []int) {
return file_v1_instance_role_service_proto_rawDescGZIP(), []int{8}
}
-func (x *DatabaseRole) GetName() string {
+func (x *InstanceRole) GetName() string {
if x != nil {
return x.Name
}
return ""
}
-func (x *DatabaseRole) GetTitle() string {
+func (x *InstanceRole) GetRoleName() string {
if x != nil {
- return x.Title
+ return x.RoleName
}
return ""
}
-func (x *DatabaseRole) GetPassword() string {
+func (x *InstanceRole) GetPassword() string {
if x != nil && x.Password != nil {
return *x.Password
}
return ""
}
-func (x *DatabaseRole) GetConnectionLimit() int32 {
+func (x *InstanceRole) GetConnectionLimit() int32 {
if x != nil && x.ConnectionLimit != nil {
return *x.ConnectionLimit
}
return 0
}
-func (x *DatabaseRole) GetValidUntil() string {
+func (x *InstanceRole) GetValidUntil() string {
if x != nil && x.ValidUntil != nil {
return *x.ValidUntil
}
return ""
}
-func (x *DatabaseRole) GetAttribute() *DatabaseRoleAttribute {
+func (x *InstanceRole) GetAttribute() *RoleAttribute {
if x != nil {
return x.Attribute
}
@@ -649,7 +649,7 @@ var file_v1_instance_role_service_proto_rawDesc = []byte{
0x6c, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05,
+ 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05,
0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,
0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x66, 0x0a,
@@ -657,12 +657,12 @@ var file_v1_instance_role_service_proto_rawDesc = []byte{
0x73, 0x74, 0x12, 0x1c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
0x12, 0x33, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74,
- 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52,
0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x04, 0x72,
0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x52, 0x6f, 0x6c, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65,
0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
@@ -673,98 +673,97 @@ var file_v1_instance_role_service_proto_rawDesc = []byte{
0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x13,
0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xf1, 0x01,
- 0x0a, 0x15, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x74,
- 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x75, 0x70, 0x65, 0x72,
- 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x75, 0x70,
- 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x5f, 0x69, 0x6e, 0x68,
- 0x65, 0x72, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6e, 0x6f, 0x49, 0x6e,
- 0x68, 0x65, 0x72, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f,
- 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61,
- 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x5f, 0x64, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x44, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
- 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x72, 0x6c, 0x73,
- 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x52, 0x6c,
- 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x6f,
- 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x08,
- 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04,
- 0xe2, 0x41, 0x01, 0x04, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
- 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52,
- 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74,
- 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74,
- 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69,
- 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x09, 0x61, 0x74, 0x74,
- 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62,
- 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
- 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f,
- 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x0e, 0x0a,
- 0x0c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x32, 0xed, 0x06,
- 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65,
- 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
- 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61,
- 0x62, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x3c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f,
- 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f,
- 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52,
- 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e,
- 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a,
- 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f,
- 0x6c, 0x65, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f,
- 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x49, 0xda,
- 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x72, 0x6f, 0x6c, 0x65, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x35, 0x3a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f,
- 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x6f,
- 0x6c, 0x65, 0x22, 0x53, 0xda, 0x41, 0x10, 0x72, 0x6f, 0x6c, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x3a, 0x04, 0x72,
- 0x6f, 0x6c, 0x65, 0x32, 0x32, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73,
- 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72,
- 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3c,
- 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x2a, 0x2d, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e,
+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe9, 0x01,
+ 0x0a, 0x0d, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12,
+ 0x1d, 0x0a, 0x0a, 0x73, 0x75, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d,
+ 0x0a, 0x0a, 0x6e, 0x6f, 0x5f, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x09, 0x6e, 0x6f, 0x49, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x12, 0x1f, 0x0a,
+ 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1b,
+ 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x63,
+ 0x61, 0x6e, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
+ 0x63, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c,
+ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72,
+ 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x79,
+ 0x70, 0x61, 0x73, 0x73, 0x5f, 0x72, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
+ 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x52, 0x6c, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0c, 0x49, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b,
+ 0x0a, 0x09, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70,
+ 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2,
+ 0x41, 0x01, 0x04, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88,
+ 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0f,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x88,
+ 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69,
+ 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
+ 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42,
+ 0x13, 0x0a, 0x11, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c,
+ 0x69, 0x6d, 0x69, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75,
+ 0x6e, 0x74, 0x69, 0x6c, 0x32, 0xed, 0x06, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x07,
+ 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22,
+ 0x3c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d,
+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f,
+ 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8a, 0x01,
+ 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f,
+ 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xda, 0x41, 0x06, 0x70,
+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31,
+ 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e,
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
- 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8e, 0x01, 0x0a,
- 0x0c, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65,
- 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61,
- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x3b, 0x3a, 0x01, 0x2a, 0x22, 0x36, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f,
- 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65,
- 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x11, 0x5a,
- 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31,
- 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f,
+ 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x49, 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c,
+ 0x72, 0x6f, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x04, 0x72, 0x6f, 0x6c, 0x65,
+ 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e,
+ 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12,
+ 0x9c, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x53, 0xda, 0x41, 0x10, 0x72, 0x6f,
+ 0x6c, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x3a, 0x3a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x32, 0x32, 0x2f, 0x76, 0x31, 0x2f,
+ 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72,
+ 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
+ 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x82,
+ 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x2f, 0x2a, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73,
+ 0x2f, 0x2a, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x0c, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c,
+ 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x3a, 0x01, 0x2a, 0x22, 0x36, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d,
+ 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
+ 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
+ 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -788,29 +787,29 @@ var file_v1_instance_role_service_proto_goTypes = []interface{}{
(*UpdateRoleRequest)(nil), // 4: bytebase.v1.UpdateRoleRequest
(*DeleteRoleRequest)(nil), // 5: bytebase.v1.DeleteRoleRequest
(*UndeleteRoleRequest)(nil), // 6: bytebase.v1.UndeleteRoleRequest
- (*DatabaseRoleAttribute)(nil), // 7: bytebase.v1.DatabaseRoleAttribute
- (*DatabaseRole)(nil), // 8: bytebase.v1.DatabaseRole
+ (*RoleAttribute)(nil), // 7: bytebase.v1.RoleAttribute
+ (*InstanceRole)(nil), // 8: bytebase.v1.InstanceRole
(*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask
(*emptypb.Empty)(nil), // 10: google.protobuf.Empty
}
var file_v1_instance_role_service_proto_depIdxs = []int32{
- 8, // 0: bytebase.v1.ListRolesResponse.roles:type_name -> bytebase.v1.DatabaseRole
- 8, // 1: bytebase.v1.CreateRoleRequest.role:type_name -> bytebase.v1.DatabaseRole
- 8, // 2: bytebase.v1.UpdateRoleRequest.role:type_name -> bytebase.v1.DatabaseRole
+ 8, // 0: bytebase.v1.ListRolesResponse.roles:type_name -> bytebase.v1.InstanceRole
+ 8, // 1: bytebase.v1.CreateRoleRequest.role:type_name -> bytebase.v1.InstanceRole
+ 8, // 2: bytebase.v1.UpdateRoleRequest.role:type_name -> bytebase.v1.InstanceRole
9, // 3: bytebase.v1.UpdateRoleRequest.update_mask:type_name -> google.protobuf.FieldMask
- 7, // 4: bytebase.v1.DatabaseRole.attribute:type_name -> bytebase.v1.DatabaseRoleAttribute
+ 7, // 4: bytebase.v1.InstanceRole.attribute:type_name -> bytebase.v1.RoleAttribute
0, // 5: bytebase.v1.InstanceRoleService.GetRole:input_type -> bytebase.v1.GetRoleRequest
1, // 6: bytebase.v1.InstanceRoleService.ListRoles:input_type -> bytebase.v1.ListRolesRequest
3, // 7: bytebase.v1.InstanceRoleService.CreateRole:input_type -> bytebase.v1.CreateRoleRequest
4, // 8: bytebase.v1.InstanceRoleService.UpdateRole:input_type -> bytebase.v1.UpdateRoleRequest
5, // 9: bytebase.v1.InstanceRoleService.DeleteRole:input_type -> bytebase.v1.DeleteRoleRequest
6, // 10: bytebase.v1.InstanceRoleService.UndeleteRole:input_type -> bytebase.v1.UndeleteRoleRequest
- 8, // 11: bytebase.v1.InstanceRoleService.GetRole:output_type -> bytebase.v1.DatabaseRole
+ 8, // 11: bytebase.v1.InstanceRoleService.GetRole:output_type -> bytebase.v1.InstanceRole
2, // 12: bytebase.v1.InstanceRoleService.ListRoles:output_type -> bytebase.v1.ListRolesResponse
- 8, // 13: bytebase.v1.InstanceRoleService.CreateRole:output_type -> bytebase.v1.DatabaseRole
- 8, // 14: bytebase.v1.InstanceRoleService.UpdateRole:output_type -> bytebase.v1.DatabaseRole
+ 8, // 13: bytebase.v1.InstanceRoleService.CreateRole:output_type -> bytebase.v1.InstanceRole
+ 8, // 14: bytebase.v1.InstanceRoleService.UpdateRole:output_type -> bytebase.v1.InstanceRole
10, // 15: bytebase.v1.InstanceRoleService.DeleteRole:output_type -> google.protobuf.Empty
- 8, // 16: bytebase.v1.InstanceRoleService.UndeleteRole:output_type -> bytebase.v1.DatabaseRole
+ 8, // 16: bytebase.v1.InstanceRoleService.UndeleteRole:output_type -> bytebase.v1.InstanceRole
11, // [11:17] is the sub-list for method output_type
5, // [5:11] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
@@ -910,7 +909,7 @@ func file_v1_instance_role_service_proto_init() {
}
}
file_v1_instance_role_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DatabaseRoleAttribute); i {
+ switch v := v.(*RoleAttribute); i {
case 0:
return &v.state
case 1:
@@ -922,7 +921,7 @@ func file_v1_instance_role_service_proto_init() {
}
}
file_v1_instance_role_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DatabaseRole); i {
+ switch v := v.(*InstanceRole); i {
case 0:
return &v.state
case 1:
diff --git a/proto/generated-go/v1/instance_role_service_grpc.pb.go b/proto/generated-go/v1/instance_role_service_grpc.pb.go
index 9a51a9a95f..1a1fd39d2d 100644
--- a/proto/generated-go/v1/instance_role_service_grpc.pb.go
+++ b/proto/generated-go/v1/instance_role_service_grpc.pb.go
@@ -23,12 +23,12 @@ const _ = grpc.SupportPackageIsVersion7
//
// 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 InstanceRoleServiceClient interface {
- GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*DatabaseRole, error)
+ GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*InstanceRole, error)
ListRoles(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error)
- CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*DatabaseRole, error)
- UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*DatabaseRole, error)
+ CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*InstanceRole, error)
+ UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*InstanceRole, error)
DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- UndeleteRole(ctx context.Context, in *UndeleteRoleRequest, opts ...grpc.CallOption) (*DatabaseRole, error)
+ UndeleteRole(ctx context.Context, in *UndeleteRoleRequest, opts ...grpc.CallOption) (*InstanceRole, error)
}
type instanceRoleServiceClient struct {
@@ -39,8 +39,8 @@ func NewInstanceRoleServiceClient(cc grpc.ClientConnInterface) InstanceRoleServi
return &instanceRoleServiceClient{cc}
}
-func (c *instanceRoleServiceClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*DatabaseRole, error) {
- out := new(DatabaseRole)
+func (c *instanceRoleServiceClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*InstanceRole, error) {
+ out := new(InstanceRole)
err := c.cc.Invoke(ctx, "/bytebase.v1.InstanceRoleService/GetRole", in, out, opts...)
if err != nil {
return nil, err
@@ -57,8 +57,8 @@ func (c *instanceRoleServiceClient) ListRoles(ctx context.Context, in *ListRoles
return out, nil
}
-func (c *instanceRoleServiceClient) CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*DatabaseRole, error) {
- out := new(DatabaseRole)
+func (c *instanceRoleServiceClient) CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*InstanceRole, error) {
+ out := new(InstanceRole)
err := c.cc.Invoke(ctx, "/bytebase.v1.InstanceRoleService/CreateRole", in, out, opts...)
if err != nil {
return nil, err
@@ -66,8 +66,8 @@ func (c *instanceRoleServiceClient) CreateRole(ctx context.Context, in *CreateRo
return out, nil
}
-func (c *instanceRoleServiceClient) UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*DatabaseRole, error) {
- out := new(DatabaseRole)
+func (c *instanceRoleServiceClient) UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*InstanceRole, error) {
+ out := new(InstanceRole)
err := c.cc.Invoke(ctx, "/bytebase.v1.InstanceRoleService/UpdateRole", in, out, opts...)
if err != nil {
return nil, err
@@ -84,8 +84,8 @@ func (c *instanceRoleServiceClient) DeleteRole(ctx context.Context, in *DeleteRo
return out, nil
}
-func (c *instanceRoleServiceClient) UndeleteRole(ctx context.Context, in *UndeleteRoleRequest, opts ...grpc.CallOption) (*DatabaseRole, error) {
- out := new(DatabaseRole)
+func (c *instanceRoleServiceClient) UndeleteRole(ctx context.Context, in *UndeleteRoleRequest, opts ...grpc.CallOption) (*InstanceRole, error) {
+ out := new(InstanceRole)
err := c.cc.Invoke(ctx, "/bytebase.v1.InstanceRoleService/UndeleteRole", in, out, opts...)
if err != nil {
return nil, err
@@ -97,12 +97,12 @@ func (c *instanceRoleServiceClient) UndeleteRole(ctx context.Context, in *Undele
// All implementations must embed UnimplementedInstanceRoleServiceServer
// for forward compatibility
type InstanceRoleServiceServer interface {
- GetRole(context.Context, *GetRoleRequest) (*DatabaseRole, error)
+ GetRole(context.Context, *GetRoleRequest) (*InstanceRole, error)
ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error)
- CreateRole(context.Context, *CreateRoleRequest) (*DatabaseRole, error)
- UpdateRole(context.Context, *UpdateRoleRequest) (*DatabaseRole, error)
+ CreateRole(context.Context, *CreateRoleRequest) (*InstanceRole, error)
+ UpdateRole(context.Context, *UpdateRoleRequest) (*InstanceRole, error)
DeleteRole(context.Context, *DeleteRoleRequest) (*emptypb.Empty, error)
- UndeleteRole(context.Context, *UndeleteRoleRequest) (*DatabaseRole, error)
+ UndeleteRole(context.Context, *UndeleteRoleRequest) (*InstanceRole, error)
mustEmbedUnimplementedInstanceRoleServiceServer()
}
@@ -110,22 +110,22 @@ type InstanceRoleServiceServer interface {
type UnimplementedInstanceRoleServiceServer struct {
}
-func (UnimplementedInstanceRoleServiceServer) GetRole(context.Context, *GetRoleRequest) (*DatabaseRole, error) {
+func (UnimplementedInstanceRoleServiceServer) GetRole(context.Context, *GetRoleRequest) (*InstanceRole, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented")
}
func (UnimplementedInstanceRoleServiceServer) ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListRoles not implemented")
}
-func (UnimplementedInstanceRoleServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*DatabaseRole, error) {
+func (UnimplementedInstanceRoleServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*InstanceRole, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented")
}
-func (UnimplementedInstanceRoleServiceServer) UpdateRole(context.Context, *UpdateRoleRequest) (*DatabaseRole, error) {
+func (UnimplementedInstanceRoleServiceServer) UpdateRole(context.Context, *UpdateRoleRequest) (*InstanceRole, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented")
}
func (UnimplementedInstanceRoleServiceServer) DeleteRole(context.Context, *DeleteRoleRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented")
}
-func (UnimplementedInstanceRoleServiceServer) UndeleteRole(context.Context, *UndeleteRoleRequest) (*DatabaseRole, error) {
+func (UnimplementedInstanceRoleServiceServer) UndeleteRole(context.Context, *UndeleteRoleRequest) (*InstanceRole, error) {
return nil, status.Errorf(codes.Unimplemented, "method UndeleteRole not implemented")
}
func (UnimplementedInstanceRoleServiceServer) mustEmbedUnimplementedInstanceRoleServiceServer() {}
diff --git a/proto/v1/instance_role_service.proto b/proto/v1/instance_role_service.proto
index 69257232b9..b978a5a6b3 100644
--- a/proto/v1/instance_role_service.proto
+++ b/proto/v1/instance_role_service.proto
@@ -13,7 +13,7 @@ import "v1/common.proto";
option go_package = "generated-go/v1";
service InstanceRoleService {
- rpc GetRole(GetRoleRequest) returns (DatabaseRole) {
+ rpc GetRole(GetRoleRequest) returns (InstanceRole) {
option (google.api.http) = {
get: "/v1/{name=environments/*/instances/*/roles/*}"
};
@@ -27,7 +27,7 @@ service InstanceRoleService {
option (google.api.method_signature) = "parent";
}
- rpc CreateRole(CreateRoleRequest) returns (DatabaseRole) {
+ rpc CreateRole(CreateRoleRequest) returns (InstanceRole) {
option (google.api.http) = {
post: "/v1/{parent=environments/*/instances/*}/roles"
body: "role"
@@ -35,7 +35,7 @@ service InstanceRoleService {
option (google.api.method_signature) = "parent,role";
}
- rpc UpdateRole(UpdateRoleRequest) returns (DatabaseRole) {
+ rpc UpdateRole(UpdateRoleRequest) returns (InstanceRole) {
option (google.api.http) = {
patch: "/v1/{role.name=environments/*/instances/*/roles/*}"
body: "role"
@@ -50,7 +50,7 @@ service InstanceRoleService {
option (google.api.method_signature) = "name";
}
- rpc UndeleteRole(UndeleteRoleRequest) returns (DatabaseRole) {
+ rpc UndeleteRole(UndeleteRoleRequest) returns (InstanceRole) {
option (google.api.http) = {
post: "/v1/{name=environments/*/instances/*/roles/*}:undelete"
body: "*"
@@ -86,7 +86,7 @@ message ListRolesRequest {
message ListRolesResponse {
// The roles from the specified request.
- repeated DatabaseRole roles = 1;
+ repeated InstanceRole roles = 1;
// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
@@ -99,7 +99,7 @@ message CreateRoleRequest {
string parent = 1 [(google.api.field_behavior) = REQUIRED];
// The role to create.
- DatabaseRole role = 2 [(google.api.field_behavior) = REQUIRED];
+ InstanceRole role = 2 [(google.api.field_behavior) = REQUIRED];
}
message UpdateRoleRequest {
@@ -107,7 +107,7 @@ message UpdateRoleRequest {
//
// The role's `name`, `environment` and `instance` field is used to identify the role to update.
// Format: environments/{environment}/instances/{instance}/roles/{role name}
- DatabaseRole role = 1 [(google.api.field_behavior) = REQUIRED];
+ InstanceRole role = 1 [(google.api.field_behavior) = REQUIRED];
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
@@ -126,7 +126,7 @@ message UndeleteRoleRequest {
}
// RoleAttribute is the attribute for role. Docs: https://www.postgresql.org/docs/current/role-attributes.html
-message DatabaseRoleAttribute {
+message RoleAttribute {
// A database superuser bypasses all permission checks, except the right to log in.
bool super_user = 1;
@@ -149,15 +149,15 @@ message DatabaseRoleAttribute {
bool bypass_rls = 7;
}
-// DatabaseRole is the API message for database role.
-message DatabaseRole {
+// InstanceRole is the API message for instance role.
+message InstanceRole {
// The name of the role.
// Format: environments/{environment}/instances/{instance}/roles/{role name}
// The role name is the unique name for the role.
string name = 1;
- // The role unique name.
- string title = 2;
+ // The role name. It's unique within the instance.
+ string role_name = 2;
// The role password.
optional string password = 3 [(google.api.field_behavior) = INPUT_ONLY];
@@ -169,5 +169,5 @@ message DatabaseRole {
optional string valid_until = 5;
// The role attribute.
- DatabaseRoleAttribute attribute = 6;
+ RoleAttribute attribute = 6;
}
\ No newline at end of file
diff --git a/server/api/v1/instance_role_service.go b/server/api/v1/instance_role_service.go
index ff48205341..ad305d876f 100644
--- a/server/api/v1/instance_role_service.go
+++ b/server/api/v1/instance_role_service.go
@@ -33,7 +33,7 @@ func NewInstanceRoleService(store *store.Store, dbFactory *dbfactory.DBFactory)
}
// GetRole gets an role.
-func (s *InstanceRoleService) GetRole(ctx context.Context, request *v1pb.GetRoleRequest) (*v1pb.DatabaseRole, error) {
+func (s *InstanceRoleService) GetRole(ctx context.Context, request *v1pb.GetRoleRequest) (*v1pb.InstanceRole, error) {
environmentID, instanceID, roleName, err := getEnvironmentInstanceRoleID(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -106,7 +106,7 @@ func (s *InstanceRoleService) ListRoles(ctx context.Context, request *v1pb.ListR
}
// CreateRole creates an role.
-func (s *InstanceRoleService) CreateRole(ctx context.Context, request *v1pb.CreateRoleRequest) (*v1pb.DatabaseRole, error) {
+func (s *InstanceRoleService) CreateRole(ctx context.Context, request *v1pb.CreateRoleRequest) (*v1pb.InstanceRole, error) {
if request.Role == nil {
return nil, status.Errorf(codes.InvalidArgument, "role must be set")
}
@@ -120,7 +120,7 @@ func (s *InstanceRoleService) CreateRole(ctx context.Context, request *v1pb.Crea
}
roleUpsert := &db.DatabaseRoleUpsertMessage{
- Name: request.Role.Title,
+ Name: request.Role.RoleName,
Password: request.Role.Password,
ConnectionLimit: request.Role.ConnectionLimit,
ValidUntil: request.Role.ValidUntil,
@@ -160,7 +160,7 @@ func (s *InstanceRoleService) CreateRole(ctx context.Context, request *v1pb.Crea
}
// UpdateRole updates an role.
-func (s *InstanceRoleService) UpdateRole(ctx context.Context, request *v1pb.UpdateRoleRequest) (*v1pb.DatabaseRole, error) {
+func (s *InstanceRoleService) UpdateRole(ctx context.Context, request *v1pb.UpdateRoleRequest) (*v1pb.InstanceRole, error) {
if request.UpdateMask == nil {
return nil, status.Errorf(codes.InvalidArgument, "update_mask must be set")
}
@@ -179,8 +179,8 @@ func (s *InstanceRoleService) UpdateRole(ctx context.Context, request *v1pb.Upda
}
for _, path := range request.UpdateMask.Paths {
switch path {
- case "role.title":
- upsert.Name = request.Role.Title
+ case "role.role_name":
+ upsert.Name = request.Role.RoleName
case "role.password":
upsert.Password = request.Role.Password
case "role.connection_limit":
@@ -255,7 +255,7 @@ func (s *InstanceRoleService) DeleteRole(ctx context.Context, request *v1pb.Dele
}
// UndeleteRole undeletes an role.
-func (*InstanceRoleService) UndeleteRole(_ context.Context, _ *v1pb.UndeleteRoleRequest) (*v1pb.DatabaseRole, error) {
+func (*InstanceRoleService) UndeleteRole(_ context.Context, _ *v1pb.UndeleteRoleRequest) (*v1pb.InstanceRole, error) {
return nil, status.Errorf(codes.Unimplemented, "Undelete role is not supported")
}
@@ -326,13 +326,13 @@ func convertToLegacyInstance(instance *store.InstanceMessage, environment *store
}
}
-func convertToRole(role *db.DatabaseRoleMessage, instance *store.InstanceMessage) *v1pb.DatabaseRole {
- return &v1pb.DatabaseRole{
+func convertToRole(role *db.DatabaseRoleMessage, instance *store.InstanceMessage) *v1pb.InstanceRole {
+ return &v1pb.InstanceRole{
Name: fmt.Sprintf("environments/%s/instances/%s/roles/%s", instance.EnvironmentID, instance.ResourceID, role.Name),
- Title: role.Name,
+ RoleName: role.Name,
ConnectionLimit: &role.ConnectionLimit,
ValidUntil: role.ValidUntil,
- Attribute: &v1pb.DatabaseRoleAttribute{
+ Attribute: &v1pb.RoleAttribute{
SuperUser: role.Attribute.SuperUser,
NoInherit: role.Attribute.NoInherit,
CreateRole: role.Attribute.CreateRole,