Commit 3e8b0c65 authored by Daniel Sonck's avatar Daniel Sonck
Browse files

Update to latest protocol version

parent 28511e13
Pipeline #558 passed with stages
in 4 minutes and 21 seconds
......@@ -2,7 +2,7 @@ case $2 in
*mod)
redo-ifchange mod.install
SUBMODULE="go.touhou.fm/radio/server/playlist/$(dirname "$1" | sed 's!\./\(.*\)!\1!g')"
SUBMODULE="git.sonck.nl/touhou.fm/radio-go/playlist/$(dirname "$1" | sed 's!\./\(.*\)!\1!g')"
go list -f '{{ join .Imports "\n" }}' "${SUBMODULE}" | \
sed -n -e 's!go\.touhou\.fm/radio/server/playlist/\(.*\)!\1/mod.dep!gp' -e '\!'"$1$2"'!d' | \
......
......@@ -8,7 +8,7 @@ case $2 in
*/playlist)
redo-ifchange mod.dep .build/test playlist.version.auto.tfvars
VERSION=$(sed -n 's/playlist_version = "\(.*\)"/\1/gp' < playlist.version.auto.tfvars)
CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -ldflags "-X go.touhou.fm/radio/server/playlist/internal.version=$VERSION" -o "$3" .
CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -ldflags "-X git.sonck.nl/touhou.fm/radio-go/playlist/internal.version=$VERSION" -o "$3" .
setcap cap_net_bind_service=+ep "$3" || true
;;
*/go-cobertura)
......
......@@ -11,6 +11,8 @@ cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqCl
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
git.sonck.nl/touhou.fm/radio-go/protocol v0.5.3 h1:OtajxTCFJHG/5l+Szj2bgeVJhbvjGRJl/V69ZFmWbys=
git.sonck.nl/touhou.fm/radio-go/protocol v0.5.3/go.mod h1:eNn6GmpfVbXAxHn0hEvjOLcGEqhI/dfXJsotfXdUWcY=
github.com/99designs/gqlgen v0.12.2 h1:aOdpsiCycFtCnAv8CAI1exnKrIDHMqtMzQoXeTziY4o=
github.com/99designs/gqlgen v0.12.2/go.mod h1:7zdGo6ry9u1YBp/qlb2uxSU5Mt2jQKLcBETQiKk+Bxo=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
......@@ -149,6 +151,7 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
......@@ -274,10 +277,12 @@ github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.15.1/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
github.com/valyala/fastjson v1.5.4 h1:r8gpiVwdzDU09NrlN38OyL5dUFpdwGQR5RQEBqY+hLg=
github.com/valyala/fastjson v1.5.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
github.com/valyala/quicktemplate v1.6.2 h1:k0vgK7zlmFzqAoIBIOrhrfmZ6JoTGJlLRPLbkPGr2/M=
github.com/valyala/quicktemplate v1.6.2/go.mod h1:mtEJpQtUiBV0SHhMX6RtiJtqxncgrfmjcUy5T68X8TM=
github.com/valyala/quicktemplate v1.6.3 h1:O7EuMwuH7Q94U2CXD6sOX8AYHqQqWtmIk690IhmpkKA=
github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U=
github.com/vektah/gqlparser v1.3.1 h1:8b0IcD3qZKWJQHSzynbDlrtP3IxVydZ2DZepCGofqfU=
......@@ -289,12 +294,6 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.touhou.fm/radio/lib/protocol v0.3.7 h1:KMuA339vd5wpaGbx57UZAU6YuYWWbKJDM2uaD9eQZ18=
go.touhou.fm/radio/lib/protocol v0.3.7/go.mod h1:RhatZgM49yTt/z74FNjHrDnAB4cW5IXrndOfYBjm0dY=
go.touhou.fm/radio/lib/protocol v0.4.0 h1:obhueJLl30YUhaXRj2eRhYIIQ9PykT1Z52W/9dKavEA=
go.touhou.fm/radio/lib/protocol v0.4.0/go.mod h1:RhatZgM49yTt/z74FNjHrDnAB4cW5IXrndOfYBjm0dY=
go.touhou.fm/radio/lib/protocol v0.4.1 h1:a3OlVI/uC8wtjEZMgSBkAlVPdPQZ9kcphsHGBYIEA+Q=
go.touhou.fm/radio/lib/protocol v0.4.1/go.mod h1:RhatZgM49yTt/z74FNjHrDnAB4cW5IXrndOfYBjm0dY=
go.touhou.fm/radio/lib/protocol v0.4.2 h1:FkChh+YNw8g8uwk45a6nGbZy/Pe1zY9b++7HUnBDbYI=
go.touhou.fm/radio/lib/protocol v0.4.2/go.mod h1:RhatZgM49yTt/z74FNjHrDnAB4cW5IXrndOfYBjm0dY=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
......
......@@ -21,7 +21,7 @@ resolver:
omit_slice_element_pointers: true
autobind:
- "go.touhou.fm/radio/server/playlist/internal/graphql/model"
- "git.sonck.nl/touhou.fm/radio-go/playlist/internal/graphql/model"
models:
ID:
......
......@@ -18,12 +18,12 @@ package cmd
import (
"fmt"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/daemon"
"git.sonck.nl/touhou.fm/radio-go/protocol/channels"
"git.sonck.nl/touhou.fm/radio-go/protocol/consumer"
"git.sonck.nl/touhou.fm/radio-go/protocol/producer"
"github.com/spf13/viper"
"go.touhou.fm/radio/lib/protocol/channels"
"go.touhou.fm/radio/lib/protocol/consumer"
"go.touhou.fm/radio/lib/protocol/producer"
"go.touhou.fm/radio/server/playlist/internal"
"go.touhou.fm/radio/server/playlist/internal/daemon"
"go.uber.org/zap"
"io"
"net"
......
......@@ -2,14 +2,14 @@ package daemon
import (
"context"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/deck"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/playlist"
"git.sonck.nl/touhou.fm/radio-go/protocol"
"git.sonck.nl/touhou.fm/radio-go/protocol/channels"
"github.com/99designs/gqlgen/graphql/playground"
"github.com/gin-gonic/gin"
"github.com/spf13/viper"
"github.com/valyala/fastjson"
"go.touhou.fm/radio/lib/protocol"
"go.touhou.fm/radio/lib/protocol/channels"
"go.touhou.fm/radio/server/playlist/internal/deck"
"go.touhou.fm/radio/server/playlist/internal/playlist"
"go.uber.org/zap"
"net"
"net/http"
......
package daemon
import (
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/graphql/generated"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/graphql/resolver"
"github.com/99designs/gqlgen/graphql/handler"
"github.com/gin-gonic/gin"
"go.touhou.fm/radio/server/playlist/internal/graphql/generated"
"go.touhou.fm/radio/server/playlist/internal/graphql/resolver"
)
func (p *daemon) graphqlHandler() (gin.HandlerFunc, error) {
......
package deck
import (
"go.touhou.fm/radio/lib/protocol"
"git.sonck.nl/touhou.fm/radio-go/protocol"
)
type Status bool
......
......@@ -11,12 +11,12 @@ import (
"sync"
"sync/atomic"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/graphql/model"
"github.com/99designs/gqlgen/graphql"
"github.com/99designs/gqlgen/graphql/introspection"
"github.com/99designs/gqlgen/plugin/federation/fedruntime"
gqlparser "github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
"go.touhou.fm/radio/server/playlist/internal/graphql/model"
)
// region ************************** generated!.gotpl **************************
......@@ -406,7 +406,7 @@ func (ec *executionContext) field_Query_playlist_args(ctx context.Context, rawAr
var arg1 *model.Cursor
if tmp, ok := rawArgs["after"]; ok {
ctx := graphql.WithFieldInputContext(ctx, graphql.NewFieldInputWithField("after"))
arg1, err = ec.unmarshalOCursor2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx, tmp)
arg1, err = ec.unmarshalOCursor2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx, tmp)
if err != nil {
return nil, err
}
......@@ -620,7 +620,7 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra
}
res := resTmp.(model.Cursor)
fc.Result = res
return ec.marshalNCursor2goᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx, field.Selections, res)
return ec.marshalNCursor2gitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx, field.Selections, res)
}
func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) {
......@@ -654,7 +654,7 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph
}
res := resTmp.(model.Cursor)
fc.Result = res
return ec.marshalNCursor2goᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx, field.Selections, res)
return ec.marshalNCursor2gitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx, field.Selections, res)
}
func (ec *executionContext) _PlayListItem_id(ctx context.Context, field graphql.CollectedField, obj *model.PlayListItem) (ret graphql.Marshaler) {
......@@ -722,7 +722,7 @@ func (ec *executionContext) _PlayListItem_track(ctx context.Context, field graph
}
res := resTmp.(*model.CueTrack)
fc.Result = res
return ec.marshalNCueTrack2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCueTrack(ctx, field.Selections, res)
return ec.marshalNCueTrack2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCueTrack(ctx, field.Selections, res)
}
func (ec *executionContext) _PlaylistConnection_id(ctx context.Context, field graphql.CollectedField, obj *model.PlaylistConnection) (ret graphql.Marshaler) {
......@@ -790,7 +790,7 @@ func (ec *executionContext) _PlaylistConnection_edges(ctx context.Context, field
}
res := resTmp.([]model.PlaylistEdge)
fc.Result = res
return ec.marshalNPlaylistEdge2ᚕgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistEdgeᚄ(ctx, field.Selections, res)
return ec.marshalNPlaylistEdge2ᚕgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistEdgeᚄ(ctx, field.Selections, res)
}
func (ec *executionContext) _PlaylistConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.PlaylistConnection) (ret graphql.Marshaler) {
......@@ -824,7 +824,7 @@ func (ec *executionContext) _PlaylistConnection_pageInfo(ctx context.Context, fi
}
res := resTmp.(*model.PageInfo)
fc.Result = res
return ec.marshalNPageInfo2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPageInfo(ctx, field.Selections, res)
return ec.marshalNPageInfo2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPageInfo(ctx, field.Selections, res)
}
func (ec *executionContext) _PlaylistEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.PlaylistEdge) (ret graphql.Marshaler) {
......@@ -858,7 +858,7 @@ func (ec *executionContext) _PlaylistEdge_node(ctx context.Context, field graphq
}
res := resTmp.(*model.PlayListItem)
fc.Result = res
return ec.marshalNPlayListItem2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlayListItem(ctx, field.Selections, res)
return ec.marshalNPlayListItem2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlayListItem(ctx, field.Selections, res)
}
func (ec *executionContext) _PlaylistEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.PlaylistEdge) (ret graphql.Marshaler) {
......@@ -892,7 +892,7 @@ func (ec *executionContext) _PlaylistEdge_cursor(ctx context.Context, field grap
}
res := resTmp.(model.Cursor)
fc.Result = res
return ec.marshalNCursor2goᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx, field.Selections, res)
return ec.marshalNCursor2gitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx, field.Selections, res)
}
func (ec *executionContext) _Query_playlistVersion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
......@@ -967,7 +967,7 @@ func (ec *executionContext) _Query_playlist(ctx context.Context, field graphql.C
}
res := resTmp.(*model.PlaylistConnection)
fc.Result = res
return ec.marshalNPlaylistConnection2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistConnection(ctx, field.Selections, res)
return ec.marshalNPlaylistConnection2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistConnection(ctx, field.Selections, res)
}
func (ec *executionContext) _Query__entities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
......@@ -2778,11 +2778,11 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se
return res
}
func (ec *executionContext) marshalNCueTrack2goᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCueTrack(ctx context.Context, sel ast.SelectionSet, v model.CueTrack) graphql.Marshaler {
func (ec *executionContext) marshalNCueTrack2gitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCueTrack(ctx context.Context, sel ast.SelectionSet, v model.CueTrack) graphql.Marshaler {
return ec._CueTrack(ctx, sel, &v)
}
func (ec *executionContext) marshalNCueTrack2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCueTrack(ctx context.Context, sel ast.SelectionSet, v *model.CueTrack) graphql.Marshaler {
func (ec *executionContext) marshalNCueTrack2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCueTrack(ctx context.Context, sel ast.SelectionSet, v *model.CueTrack) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "must not be null")
......@@ -2792,13 +2792,13 @@ func (ec *executionContext) marshalNCueTrack2ᚖgoᚗtouhouᚗfmᚋradioᚋserve
return ec._CueTrack(ctx, sel, v)
}
func (ec *executionContext) unmarshalNCursor2goᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx context.Context, v interface{}) (model.Cursor, error) {
func (ec *executionContext) unmarshalNCursor2gitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx context.Context, v interface{}) (model.Cursor, error) {
tmp, err := graphql.UnmarshalString(v)
res := model.Cursor(tmp)
return res, graphql.WrapErrorWithInputPath(ctx, err)
}
func (ec *executionContext) marshalNCursor2goᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx context.Context, sel ast.SelectionSet, v model.Cursor) graphql.Marshaler {
func (ec *executionContext) marshalNCursor2gitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx context.Context, sel ast.SelectionSet, v model.Cursor) graphql.Marshaler {
res := graphql.MarshalString(string(v))
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
......@@ -2853,7 +2853,7 @@ func (ec *executionContext) marshalNInt642int64(ctx context.Context, sel ast.Sel
return res
}
func (ec *executionContext) marshalNPageInfo2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *model.PageInfo) graphql.Marshaler {
func (ec *executionContext) marshalNPageInfo2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *model.PageInfo) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "must not be null")
......@@ -2863,7 +2863,7 @@ func (ec *executionContext) marshalNPageInfo2ᚖgoᚗtouhouᚗfmᚋradioᚋserve
return ec._PageInfo(ctx, sel, v)
}
func (ec *executionContext) marshalNPlayListItem2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlayListItem(ctx context.Context, sel ast.SelectionSet, v *model.PlayListItem) graphql.Marshaler {
func (ec *executionContext) marshalNPlayListItem2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlayListItem(ctx context.Context, sel ast.SelectionSet, v *model.PlayListItem) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "must not be null")
......@@ -2873,11 +2873,11 @@ func (ec *executionContext) marshalNPlayListItem2ᚖgoᚗtouhouᚗfmᚋradioᚋs
return ec._PlayListItem(ctx, sel, v)
}
func (ec *executionContext) marshalNPlaylistConnection2goᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistConnection(ctx context.Context, sel ast.SelectionSet, v model.PlaylistConnection) graphql.Marshaler {
func (ec *executionContext) marshalNPlaylistConnection2gitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistConnection(ctx context.Context, sel ast.SelectionSet, v model.PlaylistConnection) graphql.Marshaler {
return ec._PlaylistConnection(ctx, sel, &v)
}
func (ec *executionContext) marshalNPlaylistConnection2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistConnection(ctx context.Context, sel ast.SelectionSet, v *model.PlaylistConnection) graphql.Marshaler {
func (ec *executionContext) marshalNPlaylistConnection2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistConnection(ctx context.Context, sel ast.SelectionSet, v *model.PlaylistConnection) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "must not be null")
......@@ -2887,11 +2887,11 @@ func (ec *executionContext) marshalNPlaylistConnection2ᚖgoᚗtouhouᚗfmᚋrad
return ec._PlaylistConnection(ctx, sel, v)
}
func (ec *executionContext) marshalNPlaylistEdge2goᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistEdge(ctx context.Context, sel ast.SelectionSet, v model.PlaylistEdge) graphql.Marshaler {
func (ec *executionContext) marshalNPlaylistEdge2gitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistEdge(ctx context.Context, sel ast.SelectionSet, v model.PlaylistEdge) graphql.Marshaler {
return ec._PlaylistEdge(ctx, sel, &v)
}
func (ec *executionContext) marshalNPlaylistEdge2ᚕgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []model.PlaylistEdge) graphql.Marshaler {
func (ec *executionContext) marshalNPlaylistEdge2ᚕgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []model.PlaylistEdge) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
......@@ -2915,7 +2915,7 @@ func (ec *executionContext) marshalNPlaylistEdge2ᚕgoᚗtouhouᚗfmᚋradioᚋs
if !isLen1 {
defer wg.Done()
}
ret[i] = ec.marshalNPlaylistEdge2goᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistEdge(ctx, sel, v[i])
ret[i] = ec.marshalNPlaylistEdge2gitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐPlaylistEdge(ctx, sel, v[i])
}
if isLen1 {
f(i)
......@@ -3303,7 +3303,7 @@ func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast
return graphql.MarshalBoolean(*v)
}
func (ec *executionContext) unmarshalOCursor2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx context.Context, v interface{}) (*model.Cursor, error) {
func (ec *executionContext) unmarshalOCursor2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx context.Context, v interface{}) (*model.Cursor, error) {
if v == nil {
return nil, nil
}
......@@ -3312,7 +3312,7 @@ func (ec *executionContext) unmarshalOCursor2ᚖgoᚗtouhouᚗfmᚋradioᚋserve
return &res, graphql.WrapErrorWithInputPath(ctx, err)
}
func (ec *executionContext) marshalOCursor2ᚖgoᚗtouhouᚗfmᚋradioᚋserverᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx context.Context, sel ast.SelectionSet, v *model.Cursor) graphql.Marshaler {
func (ec *executionContext) marshalOCursor2ᚖgitᚗsonckᚗnlᚋtouhouᚗfmᚋradioᚑgoᚋplaylistᚋinternalᚋgraphqlᚋmodelᚐCursor(ctx context.Context, sel ast.SelectionSet, v *model.Cursor) graphql.Marshaler {
if v == nil {
return graphql.Null
}
......
......@@ -3,7 +3,7 @@ package model
import (
"encoding/base64"
"fmt"
"go.touhou.fm/radio/lib/protocol"
"git.sonck.nl/touhou.fm/radio-go/protocol"
"strconv"
"strings"
)
......
......@@ -6,18 +6,18 @@ package resolver
import (
"context"
"fmt"
playlist2 "go.touhou.fm/radio/server/playlist/internal/playlist"
"go.touhou.fm/radio/server/playlist/internal"
"go.touhou.fm/radio/server/playlist/internal/graphql/generated"
"go.touhou.fm/radio/server/playlist/internal/graphql/model"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/graphql/generated"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/graphql/model"
playlist2 "git.sonck.nl/touhou.fm/radio-go/playlist/internal/playlist"
)
func (r *queryResolver) PlaylistVersion(ctx context.Context) (string, error) {
func (r *queryResolver) PlaylistVersion(_ context.Context) (string, error) {
return fmt.Sprintf("%s (%s)", internal.VersionText, internal.GoVersionText), nil
}
func (r *queryResolver) Playlist(ctx context.Context, first int, after *model.Cursor) (*model.PlaylistConnection, error) {
func (r *queryResolver) Playlist(_ context.Context, first int, after *model.Cursor) (*model.PlaylistConnection, error) {
start, err := after.Parse("PlaylistItem")
if err != nil {
return nil, err
......@@ -41,7 +41,7 @@ func (r *queryResolver) Playlist(ctx context.Context, first int, after *model.Cu
count++
}
return &model.PlaylistConnection{
ID: fmt.Sprintf("%d:%d", start+1, count-1),
ID: fmt.Sprintf("%d:%d", start+1, count-1),
Edges: result,
PageInfo: &model.PageInfo{
HasNextPage: item != nil,
......
package resolver
import "go.touhou.fm/radio/server/playlist/internal/playlist"
import "git.sonck.nl/touhou.fm/radio-go/playlist/internal/playlist"
//go:generate go run github.com/99designs/gqlgen
......
......@@ -6,8 +6,8 @@ package resolver
import (
"context"
"go.touhou.fm/radio/server/playlist/internal/graphql/generated"
"go.touhou.fm/radio/server/playlist/internal/graphql/model"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/graphql/generated"
"git.sonck.nl/touhou.fm/radio-go/playlist/internal/graphql/model"
)
func (r *playListItemResolver) Track(ctx context.Context, obj *model.PlayListItem) (*model.CueTrack, error) {
......
package playlist
import (
"git.sonck.nl/touhou.fm/radio-go/protocol"
"github.com/pkg/math"
"go.touhou.fm/radio/lib/protocol"
"math/rand"
"testing"
)
......
......@@ -2,7 +2,7 @@ package playlist
import (
"fmt"
"go.touhou.fm/radio/lib/protocol"
"git.sonck.nl/touhou.fm/radio-go/protocol"
)
type ListItem struct {
......
package playlist
import (
"git.sonck.nl/touhou.fm/radio-go/protocol"
"github.com/pkg/math"
"go.touhou.fm/radio/lib/protocol"
"math/rand"
"testing"
)
......
......@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package main
import "go.touhou.fm/radio/server/playlist/internal/cmd"
import "git.sonck.nl/touhou.fm/radio-go/playlist/internal/cmd"
func main() {
cmd.Execute()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment