MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / CountAdmins

Method CountAdmins

server-source-code/internal/store/users.go:199–206  ·  view source on GitHub ↗

CountAdmins returns count of admin users.

(ctx context.Context)

Source from the content-addressed store, hash-verified

197
198// CountAdmins returns count of admin users.
199func (s *UsersStore) CountAdmins(ctx context.Context) (int, error) {
200 d := s.db.DB(ctx)
201 n, err := d.Queries.CountAdmins(ctx)
202 if err != nil {
203 return 0, err
204 }
205 return int(n), nil
206}
207
208// Create creates a new user.
209func (s *UsersStore) Create(ctx context.Context, u *models.User) error {

Callers

nothing calls this directly

Calls 2

DBMethod · 0.65
CountAdminsMethod · 0.65

Tested by

no test coverage detected