Compare commits

..

No commits in common. "main" and "v1.1.1" have entirely different histories.
main ... v1.1.1

2 changed files with 7 additions and 4 deletions

2
go.sum
View file

@ -1,3 +1,5 @@
git.ailur.dev/ailur/fg-library/v3 v3.5.0 h1:BGDlS4nQ2PyZWNU4gH3eckVqhZUFIM/zKIj/HXx8RmA=
git.ailur.dev/ailur/fg-library/v3 v3.5.0/go.mod h1:ArNsafpqES2JuxQM5aM+bNe0FwHLIsL6pbjpiWvDwGs=
git.ailur.dev/ailur/fg-library/v3 v3.6.2 h1:PNJKxpvbel2iDeB9+/rpYRyMoim6JjRHOXPYFYky7Ng= git.ailur.dev/ailur/fg-library/v3 v3.6.2 h1:PNJKxpvbel2iDeB9+/rpYRyMoim6JjRHOXPYFYky7Ng=
git.ailur.dev/ailur/fg-library/v3 v3.6.2/go.mod h1:ArNsafpqES2JuxQM5aM+bNe0FwHLIsL6pbjpiWvDwGs= git.ailur.dev/ailur/fg-library/v3 v3.6.2/go.mod h1:ArNsafpqES2JuxQM5aM+bNe0FwHLIsL6pbjpiWvDwGs=
github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0= github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0=

View file

@ -2,9 +2,9 @@ package library
import ( import (
"crypto/ed25519" "crypto/ed25519"
"fmt"
library "git.ailur.dev/ailur/fg-library/v3" library "git.ailur.dev/ailur/fg-library/v3"
"github.com/google/uuid" "github.com/google/uuid"
"io"
"time" "time"
) )
@ -24,7 +24,7 @@ type OAuthResponse struct {
type File struct { type File struct {
Name string `validate:"required"` Name string `validate:"required"`
User uuid.UUID `validate:"required"` User uuid.UUID `validate:"required"`
Reader *io.LimitedReader // Only used for write operations Bytes []byte // Only used in write operations
} }
type Quota struct { type Quota struct {
@ -66,6 +66,7 @@ func GetOAuthHostname(information *library.ServiceInitializationInformation) (st
} }
func InitializeOAuth(oauth OAuthInformation, information *library.ServiceInitializationInformation) (oauthResponse OAuthResponse, pk ed25519.PublicKey, hostname string, err error) { func InitializeOAuth(oauth OAuthInformation, information *library.ServiceInitializationInformation) (oauthResponse OAuthResponse, pk ed25519.PublicKey, hostname string, err error) {
fmt.Println("Initializing OAuth")
pk, err = GetPublicKey(information) pk, err = GetPublicKey(information)
if err != nil { if err != nil {
return return