mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 18:23:08 +03:00
25 lines
483 B
Go
25 lines
483 B
Go
package resolvers
|
|
|
|
import (
|
|
"context"
|
|
"image/color"
|
|
|
|
"github.com/MichaelMure/git-bug/graphql/graph"
|
|
)
|
|
|
|
var _ graph.ColorResolver = &colorResolver{}
|
|
|
|
type colorResolver struct{}
|
|
|
|
func (colorResolver) R(_ context.Context, obj *color.RGBA) (int, error) {
|
|
return int(obj.R), nil
|
|
}
|
|
|
|
func (colorResolver) G(_ context.Context, obj *color.RGBA) (int, error) {
|
|
return int(obj.G), nil
|
|
}
|
|
|
|
func (colorResolver) B(_ context.Context, obj *color.RGBA) (int, error) {
|
|
return int(obj.B), nil
|
|
}
|