Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
5073b43777 | |||
f2cbf28b20 | |||
240c50b06c | |||
1fa7a55d82 |
2 changed files with 4 additions and 7 deletions
2
go.sum
2
go.sum
|
@ -1,5 +1,3 @@
|
||||||
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=
|
||||||
|
|
9
main.go
9
main.go
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@ 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"`
|
||||||
Bytes []byte // Only used in write operations
|
Reader *io.LimitedReader // Only used for write operations
|
||||||
}
|
}
|
||||||
|
|
||||||
type Quota struct {
|
type Quota struct {
|
||||||
|
@ -66,7 +66,6 @@ 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
|
||||||
|
|
Loading…
Add table
Reference in a new issue