Documentation
¶
Index ¶
- Variables
- func AdminActivateIdentity(service identity_controllers.IdentityService) *graphql.Field
- func AdminBlockIdentity(service identity_controllers.IdentityService) *graphql.Field
- func AdminCreateIdentityAndInviteField(service identity_controllers.IdentityService) *graphql.Field
- func AdminDeleteIdentity(service identity_controllers.IdentityService) *graphql.Field
- func AdminInviteField(service identity_controllers.IdentityService) *graphql.Field
- func AdminLockIdentity(service identity_controllers.IdentityService) *graphql.Field
- func AdminUnBlockIdentity(service identity_controllers.IdentityService) *graphql.Field
- func AdminUnlockIdentity(service identity_controllers.IdentityService) *graphql.Field
- func AnonymizeField(service identity_controllers.IdentityService) *graphql.Field
- func ApiTokensField(service identity_controllers.IdentityService) *graphql.Field
- func ChangePasswordField(service identity_controllers.IdentityService) *graphql.Field
- func CheckAdmin(service identity_controllers.IdentityService, p *graphql.ResolveParams) (err error)
- func ConfirmResetPasswordField(service identity_controllers.IdentityService) *graphql.Field
- func CreateApiTokenField(service identity_controllers.IdentityService) *graphql.Field
- func CurrentIdentityField(service identity_controllers.IdentityService) *graphql.Field
- func CurrentIdentityIsAdminField(service identity_controllers.IdentityService) *graphql.Field
- func DeleteApiTokenField(service identity_controllers.IdentityService) *graphql.Field
- func DeleteField(service identity_controllers.IdentityService) *graphql.Field
- func GetIdentityUIDFromContext(p *graphql.ResolveParams) (uid uuid.UUID, err error)
- func GetIpFromContext(p *graphql.ResolveParams) (ip string, err error)
- func GetOriginFromContext(p *graphql.ResolveParams) (origin string, err error)
- func GetUserAgentFromContext(p *graphql.ResolveParams) (userAgent string, err error)
- func IdentitiesSearchField(service identity_controllers.IdentityService) *graphql.Field
- func IdentityApiTokensField(service identity_controllers.IdentityService) *graphql.Field
- func IdentityField(service identity_controllers.IdentityService) *graphql.Field
- func InitResetPasswordField(service identity_controllers.IdentityService) *graphql.Field
- func InvitationConfirmationField(service identity_controllers.IdentityService) *graphql.Field
- func LoginAttemptsField(service identity_controllers.IdentityService) *graphql.Field
- func LoginField(service identity_controllers.IdentityService) *graphql.Field
- func ParseUIDFromArgs(p *graphql.ResolveParams, key string) (uid uuid.UUID, err error)
- func RegisterField(service identity_controllers.IdentityService) *graphql.Field
- func RegistrationConfirmationField(service identity_controllers.IdentityService) *graphql.Field
- func UpdateIdentityField(service identity_controllers.IdentityService) *graphql.Field
- type AdminMutations
- type AdminQueries
- type IdentitiesPaginationDTO
- type LoginAttemptsPaginationDTO
- type Mutations
- type Queries
Constants ¶
This section is empty.
Variables ¶
var AdminIdentityGraphQlModel = graphql.NewObject(graphql.ObjectConfig{ Name: "AdminIdentity", Description: "the administration identity", Fields: graphql.Fields{ "UID": &graphql.Field{ Type: graphql.String, Description: "the unique ID of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.UID, nil } return nil, errors.New("can not cast UID object") }, }, "acceptConditionsAndPrivacy": &graphql.Field{ Type: graphql.Boolean, Description: "accept conditions and privacy", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.AcceptConditionsAndPrivacy, nil } return nil, errors.New("can not cast accept terms and conditions value") }, }, "active": &graphql.Field{ Type: graphql.Boolean, Description: "has activated the account through email", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.Active, nil } return nil, errors.New("can not cast active value") }, }, "cleared": &graphql.Field{ Type: graphql.Boolean, Description: "has been cleared by an admin or automatically depending on the settings", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.Cleared, nil } return nil, errors.New("can not cast cleared value") }, }, "blocked": &graphql.Field{ Type: graphql.Boolean, Description: "has been blocked by an admin", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.Blocked, nil } return nil, errors.New("can not cast blocked value") }, }, "createdAt": &graphql.Field{ Type: graphql.DateTime, Description: "the creation date of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.CreatedAt, nil } return nil, errors.New("can not cast created at timestamp") }, }, "deletedAt": &graphql.Field{ Type: graphql.DateTime, Description: "the deletion date of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.DeletedAt, nil } return nil, errors.New("can not cast deleted at timestamp") }, }, "updatedAt": &graphql.Field{ Type: graphql.DateTime, Description: "the update date of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.UpdatedAt, nil } return nil, errors.New("can not cast updated at timestamp") }, }, "salutation": &graphql.Field{ Type: graphql.String, Description: "the salutation of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.Salutation, nil } return nil, errors.New("can not cast salutation value") }, }, "firstName": &graphql.Field{ Type: graphql.String, Description: "the first name of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.FirstName, nil } return nil, errors.New("can not cast first name value") }, }, "lastName": &graphql.Field{ Type: graphql.String, Description: "the last name of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.LastName, nil } return nil, errors.New("can not cast last name value") }, }, "email": &graphql.Field{ Type: graphql.String, Description: "the email of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.Email, nil } return nil, errors.New("can not cast email object") }, }, "backupEmail": &graphql.Field{ Type: graphql.Int, Description: "the backup email of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.BackupEmail, nil } return nil, errors.New("can not cast backup email object") }, }, "phone": &graphql.Field{ Type: graphql.String, Description: "the phone number of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.Phone, nil } return nil, errors.New("can not cast phone object") }, }, "backupPhone": &graphql.Field{ Type: graphql.Int, Description: "the backup phone of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.BackupPhone, nil } return nil, errors.New("can not cast backup phone object") }, }, }, })
AdminIdentityGraphQlModel is the identity model for the GraphQL admin interface
var ApiTokenGraphQlModel = graphql.NewObject(graphql.ObjectConfig{ Name: "ApiToken", Description: "the API token of the identity", Fields: graphql.Fields{ "UID": &graphql.Field{ Type: graphql.String, Description: "the unique ID of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityApiToken); ok { return obj.UID, nil } return nil, errors.New("can not cast api token UID") }, }, "createdAt": &graphql.Field{ Type: graphql.DateTime, Description: "the creation date of the api token", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityApiToken); ok { return obj.CreatedAt, nil } return nil, errors.New("can not cast api token creation date") }, }, "name": &graphql.Field{ Type: graphql.String, Description: "the name of the api token", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityApiToken); ok { return obj.Name, nil } return nil, errors.New("can not cast api token name") }, }, "token": &graphql.Field{ Type: graphql.String, Description: "the name of the api token", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityApiToken); ok { return obj.Token, nil } return nil, errors.New("can not cast api token") }, }, "expirationDate": &graphql.Field{ Type: graphql.DateTime, Description: "the expiration dat of the api token", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityApiToken); ok { return obj.ExpirationDate, nil } return nil, errors.New("can not cast api token expiration date") }, }, }, })
ApiTokenGraphQlModel is the graphql model for the api token
var ErrAgentFromContext = errors.New("can not extract user agent from context")
ErrAgentFromContext is returned when the user agent is not found in the context
var ErrInvalidUid = errors.New("can not parse uid from arguments")
ErrInvalidUid is returned when the uid is invalid
var ErrIpFromContext = errors.New("can not extract ip from context")
ErrIpFromContext is returned when the user ip is not found in the context
var ErrOriginFromContext = errors.New("can not extract origin from context")
ErrOriginFromContext is returned when the origin is not found in the context
var ErrUserIdFromContext = errors.New("can not get IDENTITY_UID from context")
ErrUserIdFromContext is returned when the user id is not found in the context
var IdentitiesPaginationGraphQlModel = graphql.NewObject(graphql.ObjectConfig{ Name: "Identities", Description: "An identities result object", Fields: graphql.Fields{ "results": &graphql.Field{ Type: graphql.NewList(AdminIdentityGraphQlModel), Description: "list of identities", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*IdentitiesPaginationDTO); ok { return obj.Results, nil } return nil, errors.New("can not cast object") }, }, "amount": &graphql.Field{ Type: graphql.Int, Description: "the total amount of identities", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*IdentitiesPaginationDTO); ok { return obj.Amount, nil } return nil, errors.New("can not cast object") }, }, }, })
IdentitiesPaginationGraphQlModel is the graphql model for the identities pagination
var IdentityGraphQlModel = graphql.NewObject(graphql.ObjectConfig{ Name: "Identity", Description: "the identity", Fields: graphql.Fields{ "UID": &graphql.Field{ Type: graphql.String, Description: "the unique ID of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.UID, nil } return nil, errors.New("can not cast UID object") }, }, "createdAt": &graphql.Field{ Type: graphql.DateTime, Description: "the creation date of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.CreatedAt, nil } return nil, errors.New("can not cast UID object") }, }, "salutation": &graphql.Field{ Type: graphql.String, Description: "the salutation of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.Salutation, nil } return nil, errors.New("can not cast email object") }, }, "firstName": &graphql.Field{ Type: graphql.String, Description: "the first name of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.FirstName, nil } return nil, errors.New("can not cast email object") }, }, "lastName": &graphql.Field{ Type: graphql.String, Description: "the last name of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.LastName, nil } return nil, errors.New("can not cast email object") }, }, "email": &graphql.Field{ Type: graphql.String, Description: "the email of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.Email, nil } return nil, errors.New("can not cast email object") }, }, "backupEmail": &graphql.Field{ Type: graphql.Int, Description: "the backup email of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.BackupEmail, nil } return nil, errors.New("can not cast backupEmail object") }, }, "phone": &graphql.Field{ Type: graphql.String, Description: "the phone number of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.Phone, nil } return nil, errors.New("can not cast phone object") }, }, "backupPhone": &graphql.Field{ Type: graphql.Int, Description: "the backup phone of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.Identity); ok { return obj.BackupPhone, nil } return nil, errors.New("can not cast backupPhone object") }, }, }, })
IdentityGraphQlModel is the identity model for the GraphQL interface
var IdentityMutationObject = graphql.NewInputObject(graphql.InputObjectConfig{ Name: "IdentityMutationObject", Fields: graphql.InputObjectConfigFieldMap{ "UID": &graphql.InputObjectFieldConfig{ Type: graphql.String, }, "salutation": &graphql.InputObjectFieldConfig{ Type: graphql.String, }, "firstName": &graphql.InputObjectFieldConfig{ Type: graphql.String, }, "lastName": &graphql.InputObjectFieldConfig{ Type: graphql.String, }, "email": &graphql.InputObjectFieldConfig{ Type: graphql.String, }, "backupEmail": &graphql.InputObjectFieldConfig{ Type: graphql.String, }, "phone": &graphql.InputObjectFieldConfig{ Type: graphql.String, }, "backupPhone": &graphql.InputObjectFieldConfig{ Type: graphql.String, }, }, })
var LoginAttemptGraphQlModel = graphql.NewObject(graphql.ObjectConfig{ Name: "LoginAttempt", Description: "the login attempt of identities", Fields: graphql.Fields{ "UID": &graphql.Field{ Type: graphql.String, Description: "the unique ID of the identity", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityLogin); ok { return obj.UID, nil } return nil, errors.New("can not cast login attempt UID") }, }, "createdAt": &graphql.Field{ Type: graphql.DateTime, Description: "the creation date of the login attempt", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityLogin); ok { return obj.CreatedAt, nil } return nil, errors.New("can not cast login attempt creation date") }, }, "email": &graphql.Field{ Type: graphql.String, Description: "the name of the login attempt", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityLogin); ok { return obj.Email, nil } return nil, errors.New("can not cast login attempt email") }, }, "origin": &graphql.Field{ Type: graphql.String, Description: "the origin of the login attempt", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityLogin); ok { return obj.Origin, nil } return nil, errors.New("can not cast login attempt origin") }, }, "userAgent": &graphql.Field{ Type: graphql.String, Description: "the user agent of the login attempt", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityLogin); ok { return obj.UserAgent, nil } return nil, errors.New("can not cast login attempt user agent") }, }, "ip": &graphql.Field{ Type: graphql.String, Description: "the ip of the login attempt", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityLogin); ok { return obj.IP, nil } return nil, errors.New("can not cast login attempt ip") }, }, "identityUID": &graphql.Field{ Type: graphql.String, Description: "the identity UID of the login attempt", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityLogin); ok { return obj.IdentityUID, nil } return nil, errors.New("can not cast login attempt identity UID") }, }, "success": &graphql.Field{ Type: graphql.Boolean, Description: "the success of the login attempt", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*identity_models.IdentityLogin); ok { if obj.IdentityUID == nil { return false, nil } return *obj.IdentityUID != uuid.Nil, nil } return nil, errors.New("can not cast login attempt identity UID") }, }, }, })
LoginAttemptGraphQlModel is the graphql model for the login attempts
var LoginAttemptsPaginationGraphQlModel = graphql.NewObject(graphql.ObjectConfig{ Name: "LoginAttemptsField", Description: "Login attempts pagination", Fields: graphql.Fields{ "results": &graphql.Field{ Type: graphql.NewList(LoginAttemptGraphQlModel), Description: "list of login attempts", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*LoginAttemptsPaginationDTO); ok { return obj.Results, nil } return nil, errors.New("can not cast object") }, }, "amount": &graphql.Field{ Type: graphql.Int, Description: "the total amount of projects", Resolve: func(p graphql.ResolveParams) (interface{}, error) { if obj, ok := p.Source.(*LoginAttemptsPaginationDTO); ok { return obj.Amount, nil } return nil, errors.New("can not cast object") }, }, }, })
LoginAttemptsPaginationGraphQlModel is the graphql model for the login attempts pagination
Functions ¶
func AdminActivateIdentity ¶
func AdminActivateIdentity(service identity_controllers.IdentityService) *graphql.Field
AdminActivateIdentity is a GraphQL mutation to activate a user
func AdminBlockIdentity ¶
func AdminBlockIdentity(service identity_controllers.IdentityService) *graphql.Field
AdminBlockIdentity is a GraphQL mutation to block a user
func AdminCreateIdentityAndInviteField ¶
func AdminCreateIdentityAndInviteField(service identity_controllers.IdentityService) *graphql.Field
AdminCreateIdentityAndInviteField is the graphql field to create and invite a new user
func AdminDeleteIdentity ¶
func AdminDeleteIdentity(service identity_controllers.IdentityService) *graphql.Field
AdminDeleteIdentity is a GraphQL mutation to delete a user
func AdminInviteField ¶
func AdminInviteField(service identity_controllers.IdentityService) *graphql.Field
AdminInviteField is the graphql field to invite a new user sends an email to the user with a link to the registration page
func AdminLockIdentity ¶
func AdminLockIdentity(service identity_controllers.IdentityService) *graphql.Field
AdminLockIdentity is a GraphQL mutation to lock an identity
func AdminUnBlockIdentity ¶
func AdminUnBlockIdentity(service identity_controllers.IdentityService) *graphql.Field
AdminUnBlockIdentity is a GraphQL mutation to unblock a user
func AdminUnlockIdentity ¶
func AdminUnlockIdentity(service identity_controllers.IdentityService) *graphql.Field
AdminUnlockIdentity is a GraphQL mutation to unlock an identity
func AnonymizeField ¶
func AnonymizeField(service identity_controllers.IdentityService) *graphql.Field
AnonymizeField is the graphql field to anonymize an identity
func ApiTokensField ¶
func ApiTokensField(service identity_controllers.IdentityService) *graphql.Field
ApiTokensField is the graphql field for the api tokens
func ChangePasswordField ¶
func ChangePasswordField(service identity_controllers.IdentityService) *graphql.Field
ChangePasswordField is the graphql field for change password
func CheckAdmin ¶
func CheckAdmin(service identity_controllers.IdentityService, p *graphql.ResolveParams) (err error)
CheckAdmin checks if the user is admin
func ConfirmResetPasswordField ¶
func ConfirmResetPasswordField(service identity_controllers.IdentityService) *graphql.Field
ConfirmResetPasswordField confirms the reset password flow
func CreateApiTokenField ¶
func CreateApiTokenField(service identity_controllers.IdentityService) *graphql.Field
CreateApiTokenField is the graphql field to create a new api token
func CurrentIdentityField ¶
func CurrentIdentityField(service identity_controllers.IdentityService) *graphql.Field
CurrentIdentityField is the graphql field that returns the current identity
func CurrentIdentityIsAdminField ¶
func CurrentIdentityIsAdminField(service identity_controllers.IdentityService) *graphql.Field
CurrentIdentityIsAdminField is the graphql field that returns true if the current identity is an admin
func DeleteApiTokenField ¶
func DeleteApiTokenField(service identity_controllers.IdentityService) *graphql.Field
DeleteApiTokenField is the graphql field for deleting an api token
func DeleteField ¶
func DeleteField(service identity_controllers.IdentityService) *graphql.Field
DeleteField is the graphql field for deleting an identity
func GetIdentityUIDFromContext ¶
func GetIdentityUIDFromContext(p *graphql.ResolveParams) (uid uuid.UUID, err error)
GetIdentityUIDFromContext returns the user id from the context
func GetIpFromContext ¶
func GetIpFromContext(p *graphql.ResolveParams) (ip string, err error)
GetIpFromContext returns the user ip from the context
func GetOriginFromContext ¶
func GetOriginFromContext(p *graphql.ResolveParams) (origin string, err error)
GetOriginFromContext returns the origin from the context
func GetUserAgentFromContext ¶
func GetUserAgentFromContext(p *graphql.ResolveParams) (userAgent string, err error)
GetUserAgentFromContext returns the user agent from the context
func IdentitiesSearchField ¶
func IdentitiesSearchField(service identity_controllers.IdentityService) *graphql.Field
IdentitiesSearchField is the graphql field for the search identities
func IdentityApiTokensField ¶
func IdentityApiTokensField(service identity_controllers.IdentityService) *graphql.Field
IdentityApiTokensField is the graphql field for the api tokens of an identity
func IdentityField ¶
func IdentityField(service identity_controllers.IdentityService) *graphql.Field
IdentityField is the graphql field for the identity
func InitResetPasswordField ¶
func InitResetPasswordField(service identity_controllers.IdentityService) *graphql.Field
InitResetPasswordField initializes the reset password flow
func InvitationConfirmationField ¶
func InvitationConfirmationField(service identity_controllers.IdentityService) *graphql.Field
InvitationConfirmationField is the graphql field to confirm an invitation
func LoginAttemptsField ¶
func LoginAttemptsField(service identity_controllers.IdentityService) *graphql.Field
LoginAttemptsField is the graphql field for searching the logins
func LoginField ¶
func LoginField(service identity_controllers.IdentityService) *graphql.Field
LoginField is the graphql field to log in a user
func ParseUIDFromArgs ¶
ParseUIDFromArgs parses the uid from the context
func RegisterField ¶
func RegisterField(service identity_controllers.IdentityService) *graphql.Field
func RegistrationConfirmationField ¶
func RegistrationConfirmationField(service identity_controllers.IdentityService) *graphql.Field
func UpdateIdentityField ¶
func UpdateIdentityField(service identity_controllers.IdentityService) *graphql.Field
Types ¶
type AdminMutations ¶
type AdminMutations struct { AdminInvite *graphql.Field AdminCreateIdentityAndInvite *graphql.Field AdminBlockIdentity *graphql.Field AdminUnblockIdentity *graphql.Field AdminLockIdentity *graphql.Field AdminUnlockIdentity *graphql.Field AdminDeleteIdentity *graphql.Field AdminActivateIdentity *graphql.Field // TODO: implement AdminResetEmail *graphql.Field AdminUpdateIdentity *graphql.Field AdminResetPassword *graphql.Field }
AdminMutations is a struct that holds all the admin mutations
func InitAdminGraphQlMutations ¶
func InitAdminGraphQlMutations(service identity_controllers.IdentityService) *AdminMutations
InitAdminGraphQlMutations initializes the admin mutations
func (*AdminMutations) GenerateMutationObjects ¶
func (gql *AdminMutations) GenerateMutationObjects(root *graphql.Object)
GenerateMutationObjects generates the mutation objects
type AdminQueries ¶
type AdminQueries struct { SearchIdentities *graphql.Field Identity *graphql.Field LoginAttempts *graphql.Field IdentityApiTokens *graphql.Field }
func InitAdminGraphQlQueries ¶
func InitAdminGraphQlQueries(service identity_controllers.IdentityService) *AdminQueries
func (*AdminQueries) GenerateQueryObjects ¶
func (gql *AdminQueries) GenerateQueryObjects(root *graphql.Object)
type IdentitiesPaginationDTO ¶
type IdentitiesPaginationDTO struct { Amount int64 Results []*identity_models.Identity }
IdentitiesPaginationDTO is the dto for the identities pagination
type LoginAttemptsPaginationDTO ¶
type LoginAttemptsPaginationDTO struct { Results []*identity_models.IdentityLogin `json:"results"` Amount int64 `json:"amount"` }
LoginAttemptsPaginationDTO is the data transfer object for the login attempts pagination
type Mutations ¶
type Mutations struct { Login *graphql.Field Register *graphql.Field RegistrationConfirmation *graphql.Field UpdateIdentity *graphql.Field ChangePassword *graphql.Field InitResetPassword *graphql.Field ConfirmResetPassword *graphql.Field DeleteIdentity *graphql.Field AnonymizeIdentity *graphql.Field CreateApiToken *graphql.Field DeleteApiToken *graphql.Field InvitationConfirmation *graphql.Field }
Mutations is a struct that holds all the mutations
func InitGraphQlMutations ¶
func InitGraphQlMutations(service identity_controllers.IdentityService) *Mutations
func (*Mutations) GenerateMutationObjects ¶
type Queries ¶
type Queries struct { CurrentIdentity *graphql.Field ApiTokens *graphql.Field CurrentIdentityIsAdminField *graphql.Field }
Queries is a struct containing all the graphql queries
func InitGraphQlQueries ¶
func InitGraphQlQueries(service identity_controllers.IdentityService) *Queries
InitGraphQlQueries initializes the graphql queries
func (*Queries) GenerateQueryObjects ¶
GenerateQueryObjects generates the query objects
Source Files
¶
- admin_identity_model.go
- admin_mutation_activate.go
- admin_mutation_block.go
- admin_mutation_delete.go
- admin_mutation_invite.go
- admin_mutation_lock.go
- admin_mutation_unlock.go
- admin_mutations.go
- admin_queries.go
- admin_query_identities.go
- admin_query_identity.go
- admin_query_identity_api_tokens.go
- admin_query_logins.go
- admin_utils.go
- api_token_model.go
- identity_model.go
- login_attempt_model.go
- mutation_anonymize.go
- mutation_api_token_create.go
- mutation_api_token_delete.go
- mutation_change_password.go
- mutation_delete.go
- mutation_invitation_confirmation.go
- mutation_login.go
- mutation_pw_recovery.go
- mutation_registration.go
- mutation_registration_confirmation.go
- mutation_update_identity.go
- mutations.go
- queries.go
- query_api_tokens.go
- query_identity.go
- query_is_admin.go
- utils.go