Skip to content

Commit 7c42215

Browse files
committed
Update dependencies in go.mod file
1 parent d3a2314 commit 7c42215

File tree

16 files changed

+253
-0
lines changed

16 files changed

+253
-0
lines changed

api/buf.gen.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: v1
2+
managed:
3+
enabled: true
4+
plugins:
5+
- plugin: buf.build/community/google-gnostic-openapi
6+
out: .
7+
opt:
8+
- paths=source_relative
9+
- title=dd-watch
10+
- version=0.0.1
11+
- description=dd-watch
12+
- plugin: buf.build/protocolbuffers/go
13+
out: .
14+
opt:
15+
- paths=source_relative
16+
- plugin: buf.build/bufbuild/validate-go
17+
out: .
18+
opt:
19+
- paths=source_relative
20+
- plugin: buf.build/grpc/go
21+
out: .
22+
opt:
23+
- paths=source_relative
24+
- require_unimplemented_servers=false
25+
- plugin: go-http
26+
path: /Users/codemaggot/go/bin/protoc-gen-go-http
27+
out: .
28+
opt:
29+
- paths=source_relative

api/buf.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: v1
2+
deps:
3+
- buf.build/googleapis/googleapis
4+
- buf.build/envoyproxy/protoc-gen-validate
5+
- buf.build/gnostic/gnostic
6+
breaking:
7+
use:
8+
- FILE
9+
lint:
10+
use:
11+
- DEFAULT
12+
except:
13+
- PACKAGE_VERSION_SUFFIX
14+
- PACKAGE_DIRECTORY_MATCH
15+
- RPC_REQUEST_STANDARD_NAME

api/openapi.yaml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Generated with protoc-gen-openapi
2+
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
3+
4+
openapi: 3.0.3
5+
info:
6+
title: dd-watch
7+
description: dd-watch
8+
version: 0.0.1
9+
paths:
10+
/v1/tolink/{uid}:
11+
get:
12+
tags:
13+
- WatchService
14+
summary: ToLink
15+
operationId: WatchService_ToLink
16+
parameters:
17+
- name: uid
18+
in: path
19+
required: true
20+
schema:
21+
type: string
22+
responses:
23+
"200":
24+
description: OK
25+
content:
26+
application/json:
27+
schema:
28+
$ref: '#/components/schemas/ToLinkResponse'
29+
default:
30+
description: Default error response
31+
content:
32+
application/json:
33+
schema:
34+
$ref: '#/components/schemas/Status'
35+
components:
36+
schemas:
37+
GoogleProtobufAny:
38+
type: object
39+
properties:
40+
'@type':
41+
type: string
42+
description: The type of the serialized message.
43+
additionalProperties: true
44+
description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
45+
Status:
46+
type: object
47+
properties:
48+
code:
49+
type: integer
50+
description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
51+
format: int32
52+
message:
53+
type: string
54+
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.
55+
details:
56+
type: array
57+
items:
58+
$ref: '#/components/schemas/GoogleProtobufAny'
59+
description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
60+
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).'
61+
ToLinkResponse:
62+
type: object
63+
properties: {}
64+
tags:
65+
- name: WatchService

api/watch/v1/watch.proto

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
syntax = "proto3";
2+
3+
package api.watch.v1;
4+
5+
import "gnostic/openapi/v3/annotations.proto";
6+
import "google/api/annotations.proto";
7+
import "validate/validate.proto";
8+
9+
option go_package = "api/watch/v1;v1";
10+
11+
service WatchService {
12+
rpc ToLink(ToLinkRequest) returns (ToLinkResponse) {
13+
option (gnostic.openapi.v3.operation) = {summary: "ToLink"};
14+
option (google.api.http) = {get: "/v1/tolink/{uid}"};
15+
}
16+
}
17+
18+
message ToLinkRequest {
19+
int64 uid = 1 [(validate.rules).int64.gt = 0];
20+
}
21+
22+
message ToLinkResponse {}

app/buf.gen.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: v1
2+
managed:
3+
enabled: true
4+
plugins:
5+
- plugin: buf.build/protocolbuffers/go
6+
out: .
7+
opt:
8+
- paths=source_relative

app/buf.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: v1
2+
deps:
3+
- buf.build/protocolbuffers/wellknowntypes
4+
breaking:
5+
use:
6+
- FILE
7+
lint:
8+
use:
9+
- DEFAULT
10+
except:
11+
- PACKAGE_VERSION_SUFFIX
12+
- PACKAGE_DIRECTORY_MATCH
13+
- RPC_REQUEST_STANDARD_NAME

app/watch/cmd/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package main
2+
3+
func main() {}

app/watch/cmd/wire.go

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package main
2+
3+
func wireApp() {}

app/watch/configs/config.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
server:
2+
http:
3+
addr: 0.0.0.0:0
4+
timeout: 1s
5+
grpc:
6+
addr: 0.0.0.0:0
7+
timeout: 1s
8+
data:
9+
database:
10+
driver: mysql
11+
source: root:dangerous@tcp(127.0.0.1:3306)/test?parseTime=true

app/watch/internal/biz/biz.go

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package biz
2+
3+
import "github.com/google/wire"
4+
5+
var ProviderSet = wire.NewSet()

app/watch/internal/conf/conf.proto

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
syntax = "proto3";
2+
3+
package dd.watch.conf;
4+
5+
import "google/protobuf/duration.proto";
6+
7+
option go_package = "dd/watch/conf;conf";
8+
9+
message Bootstrap {
10+
Server server = 1;
11+
Data data = 2;
12+
}
13+
14+
message Server {
15+
message HTTP {
16+
string network = 1;
17+
string addr = 2;
18+
google.protobuf.Duration timeout = 3;
19+
}
20+
message GRPC {
21+
string network = 1;
22+
string addr = 2;
23+
google.protobuf.Duration timeout = 3;
24+
}
25+
HTTP http = 1;
26+
GRPC grpc = 2;
27+
}
28+
29+
message Data {
30+
message Database {
31+
string driver = 1;
32+
string source = 2;
33+
}
34+
Database database = 1;
35+
}

app/watch/internal/data/data.go

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package data
2+
3+
import "github.com/google/wire"
4+
5+
var ProviderSet = wire.NewSet()

app/watch/internal/server/server.go

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package server
2+
3+
import "github.com/google/wire"
4+
5+
var ProviderSet = wire.NewSet()

app/watch/internal/service/service.go

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package service
2+
3+
import "github.com/google/wire"
4+
5+
var ProviderSet = wire.NewSet()

buf.work.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: v1
2+
directories:
3+
- api
4+
- app

go.mod

+25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
11
module github.com/uneva/dd-watch
22

33
go 1.21.6
4+
5+
require (
6+
github.com/envoyproxy/protoc-gen-validate v1.0.4
7+
github.com/go-kratos/kratos/v2 v2.7.2
8+
github.com/google/gnostic v0.7.0
9+
github.com/google/wire v0.5.0
10+
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe
11+
google.golang.org/grpc v1.61.0
12+
google.golang.org/protobuf v1.32.0
13+
)
14+
15+
require (
16+
github.com/go-kratos/aegis v0.2.0 // indirect
17+
github.com/go-playground/form/v4 v4.2.0 // indirect
18+
github.com/golang/protobuf v1.5.3 // indirect
19+
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
20+
github.com/google/uuid v1.4.0 // indirect
21+
github.com/gorilla/mux v1.8.0 // indirect
22+
golang.org/x/net v0.20.0 // indirect
23+
golang.org/x/sys v0.16.0 // indirect
24+
golang.org/x/text v0.14.0 // indirect
25+
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect
26+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect
27+
gopkg.in/yaml.v3 v3.0.1 // indirect
28+
)

0 commit comments

Comments
 (0)