Skip to content

Commit

Permalink
docs: update deprecated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tdeshong committed Nov 19, 2024
1 parent b81330d commit 288acd5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ type Config struct {
HeaderAuth bool
}

// Deprecated: will be replace with a different object in v2
// Deprecated: will be rename to `Passage` in v2
type App struct {
ID string
// Deprecated
Config *Config
User *AppUser
client *ClientWithResponses
Expand Down Expand Up @@ -61,7 +62,7 @@ func New(appID string, config *Config) (*App, error) {
return &app, nil
}

// Deprecated: GetApp
// Deprecated: GetApp - this method will not be replaced
// GetApp gets information about an app
// returns App on success, error on failure
func (a *App) GetApp() (*AppInfo, error) {
Expand Down
20 changes: 10 additions & 10 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
)

// Deprecated: Use Get() instead.
// Deprecated: Use Passage.User.Get() instead.
// GetUser gets a user using their userID
// returns user on success, error on failure
func (a *App) GetUser(userID string) (*User, error) {
Expand Down Expand Up @@ -40,7 +40,7 @@ func (a *App) GetUser(userID string) (*User, error) {
}
}

// Deprecated: Use GetByIdentifier() instead.
// Deprecated: Use Passage.User.GetByIdentifier() instead.
// GetUserByIdentifier gets a user using their identifier
// returns user on success, error on failure
func (a *App) GetUserByIdentifier(identifier string) (*User, error) {
Expand Down Expand Up @@ -93,7 +93,7 @@ func (a *App) GetUserByIdentifier(identifier string) (*User, error) {
}
}

// Deprecated: Use Activate() instead.
// Deprecated: Use Passage.User.Activate() instead.
// ActivateUser activates a user using their userID
// returns user on success, error on failure
func (a *App) ActivateUser(userID string) (*User, error) {
Expand Down Expand Up @@ -126,7 +126,7 @@ func (a *App) ActivateUser(userID string) (*User, error) {
}
}

// Deprecated: Use Deactivate() instead.
// Deprecated: Use Passage.User.Deactivate() instead.
// DeactivateUser deactivates a user using their userID
// returns user on success, error on failure
func (a *App) DeactivateUser(userID string) (*User, error) {
Expand Down Expand Up @@ -159,7 +159,7 @@ func (a *App) DeactivateUser(userID string) (*User, error) {
}
}

// Deprecated: Use Update() instead.
// Deprecated: Use Passage.User.Update() instead.
// UpdateUser receives an UpdateBody struct, updating the corresponding user's attribute(s)
// returns user on success, error on failure
func (a *App) UpdateUser(userID string, updateBody UpdateBody) (*User, error) {
Expand Down Expand Up @@ -194,7 +194,7 @@ func (a *App) UpdateUser(userID string, updateBody UpdateBody) (*User, error) {
}
}

// Deprecated: Use Delete() instead.
// Deprecated: Use Passage.User.Delete() instead.
// DeleteUser receives a userID (string), and deletes the corresponding user
// returns true on success, false and error on failure (bool, err)
func (a *App) DeleteUser(userID string) (bool, error) {
Expand Down Expand Up @@ -227,7 +227,7 @@ func (a *App) DeleteUser(userID string) (bool, error) {
}
}

// Deprecated: Use Create() instead.
// Deprecated: Use Passage.User.Create() instead.
// CreateUser receives a CreateUserBody struct, creating a user with provided values
// returns user on success, error on failure
func (a *App) CreateUser(createUserBody CreateUserBody) (*User, error) {
Expand Down Expand Up @@ -260,7 +260,7 @@ func (a *App) CreateUser(createUserBody CreateUserBody) (*User, error) {
}
}

// Deprecated: Use ListDevices() instead.
// Deprecated: Use Passage.User.ListDevices() instead.
// ListUserDevices lists a user's devices
// returns a list of devices on success, error on failure
func (a *App) ListUserDevices(userID string) ([]WebAuthnDevices, error) {
Expand Down Expand Up @@ -293,7 +293,7 @@ func (a *App) ListUserDevices(userID string) ([]WebAuthnDevices, error) {
}
}

// Deprecated: Use RevokeDevice() instead.
// Deprecated: Use Passage.User.RevokeDevice() instead.
// RevokeUserDevice gets a user using their userID
// returns a true success, error on failure
func (a *App) RevokeUserDevice(userID, deviceID string) (bool, error) {
Expand Down Expand Up @@ -331,7 +331,7 @@ func (a *App) RevokeUserDevice(userID, deviceID string) (bool, error) {
}
}

// Deprecated: Use SignOut() instead.
// Deprecated: Use Passage.User.SignOut() instead.
// Signout revokes a users refresh tokens
// returns true on success, error on failure
func (a *App) SignOut(userID string) (bool, error) {
Expand Down

0 comments on commit 288acd5

Please sign in to comment.