From 982b60bde6a32ad1e6f5244d1e39a486c0068d67 Mon Sep 17 00:00:00 2001 From: cyber-dream Date: Sun, 15 Jan 2023 15:20:34 +0300 Subject: [PATCH] new structs for api --- auth/auth.go | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/auth/auth.go b/auth/auth.go index 22c7409..8330de8 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -1,5 +1,33 @@ package sharedauth -type InstallId struct { - InstallId string +import "time" + +type InstallIdRegisterReq struct { + InstallId InstallId +} + +type InstallId string + +func (id InstallId) Validate() bool { + //TODO: More checks + return id != "" +} + +type RedirResp struct { + RedirectUrl string +} + +type LauncherSession struct { + // Username string + // DiscordId string + SessionToken string + InstallId string + Expiry time.Time +} + +type ValidateReq struct { + LauncherToken string +} + +type ValidateResp struct { }