Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Show action.Action = func(ctx context.Context) error { l := logger.WithField("func", "Show") dbClient, err := bun.New(ctx) if err != nil { l.Errorf("db: %s", err.Error()) return err } defer func() { err := dbClient.Close(ctx) if err != nil { l.Errorf("closing db: %s", err.Error()) } }() account := viper.GetString(config.Keys.UserAccount) l.Infof("reading account %s", account) username, domain, err := fedi.SplitAccount(account) if err != nil { l.Errorf("splitting account: %s", err.Error()) return err } instance, err := dbClient.ReadFediInstanceByDomain(ctx, domain) if err != nil { l.Errorf("read instance: %s", err.Error()) return err } if instance == nil { l.Infof("instance '%s' not found", domain) } user, err := dbClient.ReadFediAccountByUsername(ctx, instance, username) if err != nil { l.Errorf("readng : %s", err.Error()) return err } l.Infof("DB ID: %d", user.ID) l.Infof("Account: @%s@%s", user.Username, instance.Domain) l.Infof("Display Name: %s", user.DisplayName) l.Infof("Sign In Count: %d", user.SignInCount) return nil }
Show displays info about a account
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.