Unverified Commit 4bf4c193 authored by Flávio Fernandes's avatar Flávio Fernandes Committed by GitHub
Browse files

Improve satori client (#1065)

parent eff9544a
Loading
Loading
Loading
Loading
+1 −1
Changes for go.mod: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ require (
	github.com/gorilla/mux v1.8.0
	github.com/gorilla/websocket v1.5.0
	github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0
	github.com/heroiclabs/nakama-common v1.28.0
	github.com/heroiclabs/nakama-common v1.28.1-0.20230731105719-fb1172396380
	github.com/jackc/pgconn v1.14.0
	github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
	github.com/jackc/pgtype v1.14.0
+2 −0
Changes for go.sum: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -294,6 +294,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/heroiclabs/nakama-common v1.28.0 h1:oj6voT/3xOkOjeWzPVkrH0ATakZT6WNLL6i6kD6dqlE=
github.com/heroiclabs/nakama-common v1.28.0/go.mod h1:Os8XeXGvHAap/p6M/8fQ3gle4eEXDGRQmoRNcPQTjXs=
github.com/heroiclabs/nakama-common v1.28.1-0.20230731105719-fb1172396380 h1:cPpoIEukbm0RmM7jzLApRVYQeZp9G1Sg1RsvyxcJ0d4=
github.com/heroiclabs/nakama-common v1.28.1-0.20230731105719-fb1172396380/go.mod h1:Os8XeXGvHAap/p6M/8fQ3gle4eEXDGRQmoRNcPQTjXs=
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+14 −0
Changes for internal/satori/satori.go: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -161,6 +161,8 @@ func (s *SatoriClient) Authenticate(ctx context.Context, id string) error {
		return err
	}

	defer res.Body.Close()

	switch res.StatusCode {
	case 200:
		return nil
@@ -198,6 +200,8 @@ func (s *SatoriClient) PropertiesGet(ctx context.Context, id string) (*runtime.P
		return nil, err
	}

	defer res.Body.Close()

	switch res.StatusCode {
	case 200:
		resBody, err := io.ReadAll(res.Body)
@@ -251,6 +255,8 @@ func (s *SatoriClient) PropertiesUpdate(ctx context.Context, id string, properti
		return err
	}

	defer res.Body.Close()

	switch res.StatusCode {
	case 200:
		return nil
@@ -315,6 +321,8 @@ func (s *SatoriClient) EventsPublish(ctx context.Context, id string, events []*r
		return err
	}

	defer res.Body.Close()

	switch res.StatusCode {
	case 200:
		return nil
@@ -361,6 +369,8 @@ func (s *SatoriClient) ExperimentsList(ctx context.Context, id string, names ...
		return nil, err
	}

	defer res.Body.Close()

	switch res.StatusCode {
	case 200:
		resBody, err := io.ReadAll(res.Body)
@@ -417,6 +427,8 @@ func (s *SatoriClient) FlagsList(ctx context.Context, id string, names ...string
		return nil, err
	}

	defer res.Body.Close()

	switch res.StatusCode {
	case 200:
		resBody, err := io.ReadAll(res.Body)
@@ -473,6 +485,8 @@ func (s *SatoriClient) LiveEventsList(ctx context.Context, id string, names ...s
		return nil, err
	}

	defer res.Body.Close()

	switch res.StatusCode {
	case 200:
		resBody, err := io.ReadAll(res.Body)
+2 −2
Changes for vendor/github.com/heroiclabs/nakama-common/runtime/runtime.go: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1210,6 +1210,6 @@ type LiveEvent struct {
	Name               string `json:"name,omitempty"`
	Description        string `json:"description,omitempty"`
	Value              string `json:"value,omitempty"`
	ActiveStartTimeSec int64  `json:"active_start_time_sec,omitempty"`
	ActiveEndTimeSec   int64  `json:"active_end_time_sec,omitempty"`
	ActiveStartTimeSec int64  `json:"active_start_time_sec,string,omitempty"`
	ActiveEndTimeSec   int64  `json:"active_end_time_sec,string,omitempty"`
}
+1 −1
Changes for vendor/modules.txt: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopena
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options
github.com/grpc-ecosystem/grpc-gateway/v2/runtime
github.com/grpc-ecosystem/grpc-gateway/v2/utilities
# github.com/heroiclabs/nakama-common v1.28.0
# github.com/heroiclabs/nakama-common v1.28.1-0.20230731105719-fb1172396380
## explicit; go 1.19
github.com/heroiclabs/nakama-common/api
github.com/heroiclabs/nakama-common/rtapi