Giter Site home page Giter Site logo

go-identity's Introduction

go-identity

Overview

This purpose is a library for the managing user identities for applications. The core of the library is User and Database data structures.

The User data structure captures the dynamics of user identities in the United States.

The Database data strcuture allows managing these identities. Currently, the Database provides a way of managing local users for a web application.

The key concurrency features of the Database are:

  • Only one Go routine is allowed making modifications to users at a time. During that time, the entire database locks.
  • Keeps user identities in Users slice of the Database data structure. The elements of the slice are pointers of User data structure The slice only grows in size.
  • Keeps references to user identities in a number hashes for faster lookup. The keys in the hashes are strings and the value is either a single pointer to User or a slice of pointers to User instances. If a reference keeps unique values, then it is a single pointer, e.g. username. Otherwise, e.g. in the case of being a part of a company, it is a slice.

The following keys are unique across the database:

  • ID
  • Username
  • EmailAddress: a user can have multiple emails, but the emails must be unique across the database.

go-identity's People

Contributors

greenpau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.