# Generated with protoc-gen-openapi # https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi openapi: 3.0.3 info: title: "" version: 0.0.1 paths: /api/segment/get/{tag}: get: tags: - LeafSegmentService description: '号段模式, 返回是以{"id": ""}' operationId: LeafSegmentService_GenSegmentId parameters: - name: tag in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/IdReply' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' /api/segment/ids: get: tags: - LeafSegmentService description: 批量获取号段模式 operationId: LeafSegmentService_GenSegmentIds parameters: - name: tag in: query schema: type: string - name: num in: query schema: type: integer format: int32 responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/GenSegmentIdsReply' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' /api/segment/info: post: tags: - LeafSegmentService operationId: LeafSegmentService_CreateSegmentId requestBody: content: application/json: schema: $ref: '#/components/schemas/LeafAllocDb' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/CreateSegmentIdResp' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' /api/snowflake/get: get: tags: - LeafSnowflakeService description: 雪花ID operationId: LeafSnowflakeService_GenSnowflakeId parameters: - name: tag in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/IdReply' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' /decodeSnowflakeId: get: tags: - LeafSnowflakeService description: 解析雪花ID operationId: LeafSnowflakeService_DecodeSnowflakeId parameters: - name: id in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/DecodeSnowflakeIdResp' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' /monitor/cache: get: tags: - LeafSegmentService description: monitor operationId: LeafSegmentService_GenSegmentCache parameters: - name: tag in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/SegmentBufferCacheViews' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' /monitor/db: get: tags: - LeafSegmentService operationId: LeafSegmentService_GenSegmentDb parameters: - name: tag in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/LeafAllocDbs' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' components: schemas: CreateSegmentIdResp: type: object properties: msg: type: string DecodeSnowflakeIdResp: type: object properties: workerId: type: string sequenceId: type: string timestamp: type: string GenSegmentIdsReply: type: object properties: ids: type: array items: type: string description: 申请到的ID 列表 GoogleProtobufAny: type: object properties: '@type': type: string description: The type of the serialized message. additionalProperties: true description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. IdReply: type: object properties: id: type: integer format: int64 description: 申请到的ID LeafAllocDb: type: object properties: bizTag: type: string maxId: type: integer format: int64 step: type: integer format: int32 description: type: string updatedTime: type: integer format: int64 createdTime: type: integer format: int64 autoClean: type: boolean LeafAllocDbs: type: object properties: leafAllocDbs: type: array items: $ref: '#/components/schemas/LeafAllocDb' SegmentBufferCacheView: type: object properties: key: type: string value0: type: integer format: int64 step0: type: integer format: int32 max0: type: integer format: int64 value1: type: integer format: int64 step1: type: integer format: int32 max1: type: integer format: int64 pos: type: integer format: int32 nextReady: type: boolean initOk: type: boolean autoClean: type: boolean description: 字段模式在内存中的各项数据 SegmentBufferCacheViews: type: object properties: segmentBufferCacheView: type: array items: $ref: '#/components/schemas/SegmentBufferCacheView' Status: type: object properties: code: type: integer description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. format: int32 message: type: string description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. details: type: array items: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).' tags: - name: LeafSegmentService description: Leaf ID生成 - name: LeafSnowflakeService description: Leaf ID生成