replace Id with ID
This commit is contained in:
@@ -9,30 +9,30 @@ import (
|
||||
|
||||
type KeySelection []int
|
||||
|
||||
type CustomerId uuid.UUID
|
||||
type CustomerID uuid.UUID
|
||||
|
||||
func (c *CustomerId) String() string {
|
||||
func (c *CustomerID) String() string {
|
||||
id := uuid.UUID(*c)
|
||||
return id.String()
|
||||
}
|
||||
|
||||
type SessionId uuid.UUID
|
||||
type UserId uuid.UUID
|
||||
type SessionID uuid.UUID
|
||||
type UserID uuid.UUID
|
||||
|
||||
func (u *UserId) String() string {
|
||||
func (u *UserID) String() string {
|
||||
id := uuid.UUID(*u)
|
||||
return id.String()
|
||||
}
|
||||
|
||||
func UserIdFromString(userId string) UserId {
|
||||
id, err := uuid.Parse(userId)
|
||||
func UserIDFromString(userID string) UserID {
|
||||
id, err := uuid.Parse(userID)
|
||||
if err != nil {
|
||||
fmt.Errorf("unable to parse user id %+v", err)
|
||||
}
|
||||
return UserId(id)
|
||||
return UserID(id)
|
||||
}
|
||||
|
||||
func (s *SessionId) String() string {
|
||||
func (s *SessionID) String() string {
|
||||
id := uuid.UUID(*s)
|
||||
return id.String()
|
||||
}
|
||||
@@ -49,15 +49,15 @@ func ParseEmail(email string) (UserEmail, error) {
|
||||
}
|
||||
|
||||
type IdxInterface []int
|
||||
type SvgIdInterface []int
|
||||
type SvgIDInterface []int
|
||||
|
||||
func SessionIdFromString(sessionId string) (SessionId, error) {
|
||||
id, err := uuid.Parse(sessionId)
|
||||
func SessionIDFromString(sessionID string) (SessionID, error) {
|
||||
id, err := uuid.Parse(sessionID)
|
||||
if err != nil {
|
||||
return SessionId{}, err
|
||||
return SessionID{}, err
|
||||
}
|
||||
|
||||
return SessionId(id), nil
|
||||
return SessionID(id), nil
|
||||
}
|
||||
|
||||
type EncipheredNKode struct {
|
||||
@@ -91,7 +91,7 @@ var SetColors = []RGBColor{
|
||||
}
|
||||
|
||||
type SignupResetInterface struct {
|
||||
SessionId string `json:"session_id"`
|
||||
SessionID string `json:"session_id"`
|
||||
UserIdxInterface IdxInterface `json:"user_interface"`
|
||||
SvgInterface []string `json:"svg_interface"`
|
||||
Colors []RGBColor `json:"colors"`
|
||||
|
||||
Reference in New Issue
Block a user