diff --git a/README.md b/README.md index 124cabaa23..6915d44a96 100644 --- a/README.md +++ b/README.md @@ -35,25 +35,32 @@ This should bring up a grpc server on port **9000** and http server on port **80 ```bash grpcurl -plaintext localhost:9000 list - acre.v1.ResourcEncodingService - attributes.v1.AttributesService + attributes.AttributesService grpc.reflection.v1.ServerReflection grpc.reflection.v1alpha.ServerReflection - - grpcurl -plaintext localhost:9000 list attributes.v1.AttributesService - - attributes.v1.AttributesService.CreateAttribute - attributes.v1.AttributesService.DeleteAttribute - attributes.v1.AttributesService.GetAttribute - attributes.v1.AttributesService.ListAttributes - attributes.v1.AttributesService.UpdateAttribute - + kasregistry.KeyAccessServerRegistryService + namespaces.NamespaceService + resourcemapping.ResourceMappingService + subjectmapping.SubjectMappingService + + grpcurl -plaintext localhost:9000 list attributes.AttributesService + + attributes.AttributesService.CreateAttribute + attributes.AttributesService.CreateAttributeValue + attributes.AttributesService.DeleteAttribute + attributes.AttributesService.DeleteAttributeValue + attributes.AttributesService.GetAttribute + attributes.AttributesService.GetAttributeValue + attributes.AttributesService.ListAttributeValues + attributes.AttributesService.ListAttributes + attributes.AttributesService.UpdateAttribute + attributes.AttributesService.UpdateAttributeValue ``` Create Attribute ```bash -grpcurl -plaintext -d @ localhost:9000 attributes.v1.AttributesService/CreateAttribute < common.Metadata - 0, // 1: attributes.Attribute.rule:type_name -> attributes.AttributeRuleTypeEnum - 3, // 2: attributes.Attribute.values:type_name -> attributes.Value - 29, // 3: attributes.AttributeCreateUpdate.metadata:type_name -> common.MetadataMutable - 0, // 4: attributes.AttributeCreateUpdate.rule:type_name -> attributes.AttributeRuleTypeEnum - 4, // 5: attributes.AttributeCreateUpdate.values:type_name -> attributes.ValueCreate - 28, // 6: attributes.Value.metadata:type_name -> common.Metadata - 29, // 7: attributes.ValueCreate.metadata:type_name -> common.MetadataMutable - 29, // 8: attributes.ValueUpdate.metadata:type_name -> common.MetadataMutable - 1, // 9: attributes.ListAttributesResponse.attributes:type_name -> attributes.Attribute - 1, // 10: attributes.GetAttributeResponse.attribute:type_name -> attributes.Attribute - 2, // 11: attributes.CreateAttributeRequest.attribute:type_name -> attributes.AttributeCreateUpdate - 1, // 12: attributes.CreateAttributeResponse.attribute:type_name -> attributes.Attribute - 2, // 13: attributes.UpdateAttributeRequest.attribute:type_name -> attributes.AttributeCreateUpdate - 1, // 14: attributes.UpdateAttributeResponse.attribute:type_name -> attributes.Attribute - 1, // 15: attributes.DeleteAttributeResponse.attribute:type_name -> attributes.Attribute - 3, // 16: attributes.GetAttributeValueResponse.value:type_name -> attributes.Value - 3, // 17: attributes.ListAttributeValuesResponse.values:type_name -> attributes.Value - 4, // 18: attributes.CreateAttributeValueRequest.value:type_name -> attributes.ValueCreate - 3, // 19: attributes.CreateAttributeValueResponse.value:type_name -> attributes.Value - 5, // 20: attributes.UpdateAttributeValueRequest.value:type_name -> attributes.ValueUpdate - 3, // 21: attributes.UpdateAttributeValueResponse.value:type_name -> attributes.Value - 3, // 22: attributes.DeleteAttributeValueResponse.value:type_name -> attributes.Value - 8, // 23: attributes.AttributesService.ListAttributes:input_type -> attributes.ListAttributesRequest - 20, // 24: attributes.AttributesService.ListAttributeValues:input_type -> attributes.ListAttributeValuesRequest - 10, // 25: attributes.AttributesService.GetAttribute:input_type -> attributes.GetAttributeRequest - 12, // 26: attributes.AttributesService.CreateAttribute:input_type -> attributes.CreateAttributeRequest - 14, // 27: attributes.AttributesService.UpdateAttribute:input_type -> attributes.UpdateAttributeRequest - 16, // 28: attributes.AttributesService.DeleteAttribute:input_type -> attributes.DeleteAttributeRequest - 18, // 29: attributes.AttributesService.GetAttributeValue:input_type -> attributes.GetAttributeValueRequest - 22, // 30: attributes.AttributesService.CreateAttributeValue:input_type -> attributes.CreateAttributeValueRequest - 24, // 31: attributes.AttributesService.UpdateAttributeValue:input_type -> attributes.UpdateAttributeValueRequest - 26, // 32: attributes.AttributesService.DeleteAttributeValue:input_type -> attributes.DeleteAttributeValueRequest - 9, // 33: attributes.AttributesService.ListAttributes:output_type -> attributes.ListAttributesResponse - 21, // 34: attributes.AttributesService.ListAttributeValues:output_type -> attributes.ListAttributeValuesResponse - 11, // 35: attributes.AttributesService.GetAttribute:output_type -> attributes.GetAttributeResponse - 13, // 36: attributes.AttributesService.CreateAttribute:output_type -> attributes.CreateAttributeResponse - 15, // 37: attributes.AttributesService.UpdateAttribute:output_type -> attributes.UpdateAttributeResponse - 17, // 38: attributes.AttributesService.DeleteAttribute:output_type -> attributes.DeleteAttributeResponse - 19, // 39: attributes.AttributesService.GetAttributeValue:output_type -> attributes.GetAttributeValueResponse - 23, // 40: attributes.AttributesService.CreateAttributeValue:output_type -> attributes.CreateAttributeValueResponse - 25, // 41: attributes.AttributesService.UpdateAttributeValue:output_type -> attributes.UpdateAttributeValueResponse - 27, // 42: attributes.AttributesService.DeleteAttributeValue:output_type -> attributes.DeleteAttributeValueResponse - 33, // [33:43] is the sub-list for method output_type - 23, // [23:33] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name + 29, // 1: attributes.Attribute.namespace:type_name -> namespaces.Namespace + 0, // 2: attributes.Attribute.rule:type_name -> attributes.AttributeRuleTypeEnum + 3, // 3: attributes.Attribute.values:type_name -> attributes.Value + 30, // 4: attributes.AttributeCreateUpdate.metadata:type_name -> common.MetadataMutable + 0, // 5: attributes.AttributeCreateUpdate.rule:type_name -> attributes.AttributeRuleTypeEnum + 4, // 6: attributes.AttributeCreateUpdate.values:type_name -> attributes.ValueCreate + 28, // 7: attributes.Value.metadata:type_name -> common.Metadata + 30, // 8: attributes.ValueCreate.metadata:type_name -> common.MetadataMutable + 30, // 9: attributes.ValueUpdate.metadata:type_name -> common.MetadataMutable + 1, // 10: attributes.ListAttributesResponse.attributes:type_name -> attributes.Attribute + 1, // 11: attributes.GetAttributeResponse.attribute:type_name -> attributes.Attribute + 2, // 12: attributes.CreateAttributeRequest.attribute:type_name -> attributes.AttributeCreateUpdate + 1, // 13: attributes.CreateAttributeResponse.attribute:type_name -> attributes.Attribute + 2, // 14: attributes.UpdateAttributeRequest.attribute:type_name -> attributes.AttributeCreateUpdate + 1, // 15: attributes.UpdateAttributeResponse.attribute:type_name -> attributes.Attribute + 1, // 16: attributes.DeleteAttributeResponse.attribute:type_name -> attributes.Attribute + 3, // 17: attributes.GetAttributeValueResponse.value:type_name -> attributes.Value + 3, // 18: attributes.ListAttributeValuesResponse.values:type_name -> attributes.Value + 4, // 19: attributes.CreateAttributeValueRequest.value:type_name -> attributes.ValueCreate + 3, // 20: attributes.CreateAttributeValueResponse.value:type_name -> attributes.Value + 5, // 21: attributes.UpdateAttributeValueRequest.value:type_name -> attributes.ValueUpdate + 3, // 22: attributes.UpdateAttributeValueResponse.value:type_name -> attributes.Value + 3, // 23: attributes.DeleteAttributeValueResponse.value:type_name -> attributes.Value + 8, // 24: attributes.AttributesService.ListAttributes:input_type -> attributes.ListAttributesRequest + 20, // 25: attributes.AttributesService.ListAttributeValues:input_type -> attributes.ListAttributeValuesRequest + 10, // 26: attributes.AttributesService.GetAttribute:input_type -> attributes.GetAttributeRequest + 12, // 27: attributes.AttributesService.CreateAttribute:input_type -> attributes.CreateAttributeRequest + 14, // 28: attributes.AttributesService.UpdateAttribute:input_type -> attributes.UpdateAttributeRequest + 16, // 29: attributes.AttributesService.DeleteAttribute:input_type -> attributes.DeleteAttributeRequest + 18, // 30: attributes.AttributesService.GetAttributeValue:input_type -> attributes.GetAttributeValueRequest + 22, // 31: attributes.AttributesService.CreateAttributeValue:input_type -> attributes.CreateAttributeValueRequest + 24, // 32: attributes.AttributesService.UpdateAttributeValue:input_type -> attributes.UpdateAttributeValueRequest + 26, // 33: attributes.AttributesService.DeleteAttributeValue:input_type -> attributes.DeleteAttributeValueRequest + 9, // 34: attributes.AttributesService.ListAttributes:output_type -> attributes.ListAttributesResponse + 21, // 35: attributes.AttributesService.ListAttributeValues:output_type -> attributes.ListAttributeValuesResponse + 11, // 36: attributes.AttributesService.GetAttribute:output_type -> attributes.GetAttributeResponse + 13, // 37: attributes.AttributesService.CreateAttribute:output_type -> attributes.CreateAttributeResponse + 15, // 38: attributes.AttributesService.UpdateAttribute:output_type -> attributes.UpdateAttributeResponse + 17, // 39: attributes.AttributesService.DeleteAttribute:output_type -> attributes.DeleteAttributeResponse + 19, // 40: attributes.AttributesService.GetAttributeValue:output_type -> attributes.GetAttributeValueResponse + 23, // 41: attributes.AttributesService.CreateAttributeValue:output_type -> attributes.CreateAttributeValueResponse + 25, // 42: attributes.AttributesService.UpdateAttributeValue:output_type -> attributes.UpdateAttributeValueResponse + 27, // 43: attributes.AttributesService.DeleteAttributeValue:output_type -> attributes.DeleteAttributeValueResponse + 34, // [34:44] is the sub-list for method output_type + 24, // [24:34] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_attributes_attributes_proto_init() } diff --git a/sdk/attributes/attributes_grpc.pb.go b/sdk/attributes/attributes_grpc.pb.go index 34b52a73de..c27a350364 100644 --- a/sdk/attributes/attributes_grpc.pb.go +++ b/sdk/attributes/attributes_grpc.pb.go @@ -37,7 +37,7 @@ const ( type AttributesServiceClient interface { // List Attributes // Example: - // grpcurl -plaintext -d '{"namespace_id": "namespace_id"}' localhost:8080 attributes.AttributesService/ListAttributes + // grpcurl -plaintext -d '{"namespace_id": "348f3698-a0c9-4ed6-a90c-e589aaf59c5"}' localhost:9000 attributes.AttributesService/ListAttributes ListAttributes(ctx context.Context, in *ListAttributesRequest, opts ...grpc.CallOption) (*ListAttributesResponse, error) // List Values // Example: @@ -47,7 +47,7 @@ type AttributesServiceClient interface { // Create Attribute // Example: // - // grpcurl -plaintext -d '{"attribute": {"namespace_id": "namespace_id", "name": "attribute_name", "rule": "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF"}}' localhost:8080 attributes.AttributesService/CreateAttribute + // grpcurl -plaintext -d '{"attribute": {"namespace_id": "348f3698-a0c9-4ed6-a90c-e589aaf59c57", "name": "attribute_name", "rule": "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF"}}' localhost:9000 attributes.AttributesService/CreateAttribute CreateAttribute(ctx context.Context, in *CreateAttributeRequest, opts ...grpc.CallOption) (*CreateAttributeResponse, error) UpdateAttribute(ctx context.Context, in *UpdateAttributeRequest, opts ...grpc.CallOption) (*UpdateAttributeResponse, error) DeleteAttribute(ctx context.Context, in *DeleteAttributeRequest, opts ...grpc.CallOption) (*DeleteAttributeResponse, error) @@ -166,7 +166,7 @@ func (c *attributesServiceClient) DeleteAttributeValue(ctx context.Context, in * type AttributesServiceServer interface { // List Attributes // Example: - // grpcurl -plaintext -d '{"namespace_id": "namespace_id"}' localhost:8080 attributes.AttributesService/ListAttributes + // grpcurl -plaintext -d '{"namespace_id": "348f3698-a0c9-4ed6-a90c-e589aaf59c5"}' localhost:9000 attributes.AttributesService/ListAttributes ListAttributes(context.Context, *ListAttributesRequest) (*ListAttributesResponse, error) // List Values // Example: @@ -176,7 +176,7 @@ type AttributesServiceServer interface { // Create Attribute // Example: // - // grpcurl -plaintext -d '{"attribute": {"namespace_id": "namespace_id", "name": "attribute_name", "rule": "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF"}}' localhost:8080 attributes.AttributesService/CreateAttribute + // grpcurl -plaintext -d '{"attribute": {"namespace_id": "348f3698-a0c9-4ed6-a90c-e589aaf59c57", "name": "attribute_name", "rule": "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF"}}' localhost:9000 attributes.AttributesService/CreateAttribute CreateAttribute(context.Context, *CreateAttributeRequest) (*CreateAttributeResponse, error) UpdateAttribute(context.Context, *UpdateAttributeRequest) (*UpdateAttributeResponse, error) DeleteAttribute(context.Context, *DeleteAttributeRequest) (*DeleteAttributeResponse, error)