auth

package
v0.0.0-...-de483c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLogEntry

type AuditLogEntry struct {
	Date       string      `json:"date"`
	TokenId    string      `json:"token_id"`
	UserId     string      `json:"user_id"`
	ProjectId  *string     `json:"project_id"`
	ObjectType *ObjectType `json:"object_type"`
	Context    interface{} `json:"context"`
	Action     string      `json:"action"`
	Id         string      `json:"id"`
	IpAddress  *string     `json:"ip_address"`
	ObjectId   *string     `json:"object_id"`
}

type AuditLogEntryListResponse

type AuditLogEntryListResponse struct {
	Metadata   ResponseMetadata    `json:"metadata"`
	Pagination *ResponsePagination `json:"pagination"`
	Data       []AuditLogEntry     `json:"data"`
	Success    bool                `json:"success"`
	Messages   ResponseMessages    `json:"messages"`
}

type AuditLogRequest

type AuditLogRequest struct {
	TokenId    string      `json:"token_id"`
	ProjectId  *string     `json:"project_id"`
	ObjectType *ObjectType `json:"object_type"`
	Context    interface{} `json:"context"`
	Action     string      `json:"action"`
	IpAddress  *string     `json:"ip_address"`
	ObjectId   *string     `json:"object_id"`
}

type AuthClient

type AuthClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string) AuthClient

func NewClientWithUrl

func NewClientWithUrl(apiKey string, baseUrl string) AuthClient

func (AuthClient) AcceptProjectInvite

func (c AuthClient) AcceptProjectInvite(id string) (EmptyResponse, *http.Response, error)

func (AuthClient) ChangeEmail

func (AuthClient) ChangePassword

func (AuthClient) CreateProject

func (AuthClient) CreateToken

func (AuthClient) CreateUser

func (AuthClient) DeleteProject

func (c AuthClient) DeleteProject(id string) (EmptyResponse, *http.Response, error)

func (AuthClient) DeleteProjectInvite

func (c AuthClient) DeleteProjectInvite(id string) (EmptyResponse, *http.Response, error)

func (AuthClient) DeleteToken

func (c AuthClient) DeleteToken(id string) (EmptyResponse, *http.Response, error)

func (AuthClient) ExecutePasswordReset

func (c AuthClient) ExecutePasswordReset(in ExecutePasswordResetRequest) (EmptyResponse, *http.Response, error)

func (AuthClient) GetCountries

func (AuthClient) GetCountry

func (c AuthClient) GetCountry(code string) (CountrySingleResponse, *http.Response, error)

func (*AuthClient) GetCurrentProject

func (c *AuthClient) GetCurrentProject() string

func (AuthClient) GetProject

func (AuthClient) GetProjectInvites

func (AuthClient) GetProjectMembers

func (AuthClient) GetProjects

func (AuthClient) GetToken

func (AuthClient) GetTokens

func (AuthClient) GetUser

func (AuthClient) GetUserProjectMemberships

func (AuthClient) GetUsers

func (AuthClient) InsertAuditLogEntry

func (c AuthClient) InsertAuditLogEntry(in AuditLogRequest) (EmptyResponse, *http.Response, error)

func (AuthClient) Login

func (AuthClient) RejectProjectInvite

func (c AuthClient) RejectProjectInvite(id string) (EmptyResponse, *http.Response, error)

func (AuthClient) RemoveProjectMember

func (c AuthClient) RemoveProjectMember(id string, user_id string) (EmptyResponse, *http.Response, error)

func (*AuthClient) Request

func (c *AuthClient) Request(method string, path string, postBody io.Reader) (*http.Response, []byte, error)

func (AuthClient) RequestPasswordReset

func (c AuthClient) RequestPasswordReset(in RequestPasswordResetRequest) (EmptyResponse, *http.Response, error)

func (AuthClient) SearchAuditLog

func (AuthClient) SearchTransactionLog

func (*AuthClient) SetAccessToken

func (c *AuthClient) SetAccessToken(token string)

func (*AuthClient) SetCurrentProject

func (c *AuthClient) SetCurrentProject(project string)

func (*AuthClient) SetHttpClient

func (c *AuthClient) SetHttpClient(client *http.Client)

func (AuthClient) UpdateProject

func (AuthClient) UpdateUser

func (AuthClient) ValidateSelf

func (c AuthClient) ValidateSelf() (TokenValidationResponse, *http.Response, error)

func (AuthClient) ValidateToken

func (c AuthClient) ValidateToken(token string) (TokenValidationResponse, *http.Response, error)

type Country

type Country struct {
	Code  string `json:"code"`
	Title string `json:"title"`
}

type CountryListResponse

type CountryListResponse struct {
	Metadata   ResponseMetadata    `json:"metadata"`
	Pagination *ResponsePagination `json:"pagination"`
	Data       []Country           `json:"data"`
	Success    bool                `json:"success"`
	Messages   ResponseMessages    `json:"messages"`
}

type CountrySingleResponse

type CountrySingleResponse struct {
	Metadata ResponseMetadata `json:"metadata"`
	Data     Country          `json:"data"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type EmailChangeRequest

type EmailChangeRequest struct {
	Password string `json:"password"`
	Email    string `json:"email"`
}

type EmptyResponse

type EmptyResponse struct {
	Metadata ResponseMetadata `json:"metadata"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type ExecutePasswordResetRequest

type ExecutePasswordResetRequest struct {
	Password string `json:"password"`
	Token    string `json:"token"`
}

type Gender

type Gender string

type GetCountriesQueryParams

type GetCountriesQueryParams struct {
	Order    *string `url:"order,omitempty"`
	PageSize *int    `url:"page_size,omitempty"`
	OrderBy  *string `url:"order_by,omitempty"`
	Search   *string `url:"search,omitempty"`
	Page     *int    `url:"page,omitempty"`
}

type GetProjectInvitesQueryParams

type GetProjectInvitesQueryParams struct {
	Order    *string                             `url:"order,omitempty"`
	Filter   *GetProjectInvitesQueryParamsFilter `url:"filter,omitempty"`
	PageSize *int                                `url:"page_size,omitempty"`
	OrderBy  *string                             `url:"order_by,omitempty"`
	Search   *string                             `url:"search,omitempty"`
	Page     *int                                `url:"page,omitempty"`
}

type GetProjectInvitesQueryParamsFilter

type GetProjectInvitesQueryParamsFilter struct {
	Email     *string `url:"email,omitempty"`
	ProjectId *string `url:"project_id,omitempty"`
	Id        *string `url:"id,omitempty"`
}

type GetProjectMembersQueryParams

type GetProjectMembersQueryParams struct {
	Order    *string                             `url:"order,omitempty"`
	Filter   *GetProjectMembersQueryParamsFilter `url:"filter,omitempty"`
	PageSize *int                                `url:"page_size,omitempty"`
	OrderBy  *string                             `url:"order_by,omitempty"`
	Search   *string                             `url:"search,omitempty"`
	Page     *int                                `url:"page,omitempty"`
}

type GetProjectMembersQueryParamsFilter

type GetProjectMembersQueryParamsFilter struct {
	Role *string `url:"role,omitempty"`
}

type GetProjectQueryParams

type GetProjectQueryParams struct {
	Detail *bool `url:"detail,omitempty"`
}

type GetProjectsQueryParams

type GetProjectsQueryParams struct {
	Order    *string                       `url:"order,omitempty"`
	Filter   *GetProjectsQueryParamsFilter `url:"filter,omitempty"`
	PageSize *int                          `url:"page_size,omitempty"`
	OrderBy  *string                       `url:"order_by,omitempty"`
	Search   *string                       `url:"search,omitempty"`
	Page     *int                          `url:"page,omitempty"`
	Detail   *bool                         `url:"detail,omitempty"`
}

type GetProjectsQueryParamsFilter

type GetProjectsQueryParamsFilter struct {
	Title *string `url:"title,omitempty"`
	Id    *string `url:"id,omitempty"`
}

type GetTokensQueryParams

type GetTokensQueryParams struct {
	Order    *string                     `url:"order,omitempty"`
	Filter   *GetTokensQueryParamsFilter `url:"filter,omitempty"`
	PageSize *int                        `url:"page_size,omitempty"`
	OrderBy  *string                     `url:"order_by,omitempty"`
	Search   *string                     `url:"search,omitempty"`
	Page     *int                        `url:"page,omitempty"`
}

type GetTokensQueryParamsFilter

type GetTokensQueryParamsFilter struct {
	Type   *string `url:"type,omitempty"`
	Title  *string `url:"title,omitempty"`
	Id     *string `url:"id,omitempty"`
	UserId *string `url:"user_id,omitempty"`
}

type GetUserProjectMembershipsQueryParams

type GetUserProjectMembershipsQueryParams struct {
	Order    *string `url:"order,omitempty"`
	PageSize *int    `url:"page_size,omitempty"`
	OrderBy  *string `url:"order_by,omitempty"`
	Search   *string `url:"search,omitempty"`
	Page     *int    `url:"page,omitempty"`
}

type GetUsersQueryParams

type GetUsersQueryParams struct {
	Order    *string                    `url:"order,omitempty"`
	Filter   *GetUsersQueryParamsFilter `url:"filter,omitempty"`
	PageSize *int                       `url:"page_size,omitempty"`
	OrderBy  *string                    `url:"order_by,omitempty"`
	Search   *string                    `url:"search,omitempty"`
	Page     *int                       `url:"page,omitempty"`
}

type GetUsersQueryParamsFilter

type GetUsersQueryParamsFilter struct {
	Type       *string `url:"type,omitempty"`
	Email      *string `url:"email,omitempty"`
	CustomerId *string `url:"customer_id,omitempty"`
	State      *string `url:"state,omitempty"`
	Id         *string `url:"id,omitempty"`
}

type InvalidRequestResponse

type InvalidRequestResponse struct {
	Metadata ResponseMetadata `json:"metadata"`
	Data     interface{}      `json:"data"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type LoginRequest

type LoginRequest struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

type LoginResponse

type LoginResponse struct {
	Metadata ResponseMetadata `json:"metadata"`
	Data     Token            `json:"data"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type ObjectType

type ObjectType string

type PasswordChangeRequest

type PasswordChangeRequest struct {
	NewPasswordConfirm string `json:"new_password_confirm"`
	NewPassword        string `json:"new_password"`
	CurrentPassword    string `json:"current_password"`
}

type Project

type Project struct {
	CreatedAt *string `json:"created_at"`
	Id        string  `json:"id"`
	Title     string  `json:"title"`
}

type ProjectCreateRequest

type ProjectCreateRequest struct {
	Title string `json:"title"`
}

type ProjectInvite

type ProjectInvite struct {
	ValidUntil   string `json:"valid_until"`
	ProjectId    string `json:"project_id"`
	CreatedAt    string `json:"created_at"`
	ProjectTitle string `json:"project_title"`
	Id           string `json:"id"`
	Email        string `json:"email"`
}

type ProjectInviteCreateRequest

type ProjectInviteCreateRequest struct {
	ProjectId string `json:"project_id"`
	Email     string `json:"email"`
}

type ProjectInviteListResponse

type ProjectInviteListResponse struct {
	Metadata   ResponseMetadata    `json:"metadata"`
	Pagination *ResponsePagination `json:"pagination"`
	Data       []ProjectInvite     `json:"data"`
	Success    bool                `json:"success"`
	Messages   ResponseMessages    `json:"messages"`
}

type ProjectInviteSingleResponse

type ProjectInviteSingleResponse struct {
	Metadata string           `json:"metadata"`
	Data     ProjectInvite    `json:"data"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type ProjectListResponse

type ProjectListResponse struct {
	Metadata   ResponseMetadata    `json:"metadata"`
	Pagination *ResponsePagination `json:"pagination"`
	Data       []Project           `json:"data"`
	Success    bool                `json:"success"`
	Messages   ResponseMessages    `json:"messages"`
}

type ProjectMember

type ProjectMember struct {
	Role      string  `json:"role"`
	UserId    *string `json:"user_id"`
	ProjectId *string `json:"project_id"`
}

type ProjectMemberCreateRequest

type ProjectMemberCreateRequest struct {
	Role   *string `json:"role"`
	UserId string  `json:"user_id"`
}

type ProjectMemberListResponse

type ProjectMemberListResponse struct {
	Metadata   ResponseMetadata    `json:"metadata"`
	Pagination *ResponsePagination `json:"pagination"`
	Data       []ProjectMember     `json:"data"`
	Success    bool                `json:"success"`
	Messages   ResponseMessages    `json:"messages"`
}

type ProjectMemberSingleResponse

type ProjectMemberSingleResponse struct {
	Metadata ResponseMetadata `json:"metadata"`
	Data     ProjectMember    `json:"data"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type ProjectSingleResponse

type ProjectSingleResponse struct {
	Metadata ResponseMetadata `json:"metadata"`
	Data     Project          `json:"data"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type ProjectUpdateRequest

type ProjectUpdateRequest struct {
	Title *string `json:"title"`
}

type RequestPasswordResetRequest

type RequestPasswordResetRequest struct {
	Username string `json:"username"`
}

type ResponseMessage

type ResponseMessage struct {
	Message string `json:"message"`
	Key     string `json:"key"`
}

type ResponseMessages

type ResponseMessages struct {
	Warnings []ResponseMessage `json:"warnings"`
	Errors   []ResponseMessage `json:"errors"`
	Infos    []ResponseMessage `json:"infos"`
}

type ResponseMetadata

type ResponseMetadata struct {
	TransactionId  string `json:"transaction_id"`
	BuildCommit    string `json:"build_commit"`
	BuildTimestamp string `json:"build_timestamp"`
}

type ResponsePagination

type ResponsePagination struct {
	Total    int `json:"total"`
	Page     int `json:"page"`
	PageSize int `json:"page_size"`
}

type SearchAuditLogQueryParams

type SearchAuditLogQueryParams struct {
	PageSize   *int    `url:"page_size,omitempty"`
	ObjectType *string `url:"object_type,omitempty"`
	ObjectId   *string `url:"object_id,omitempty"`
	ProjectId  *string `url:"project_id,omitempty"`
	Page       *int    `url:"page,omitempty"`
	UserId     *string `url:"user_id,omitempty"`
}

type Token

type Token struct {
	UserId     string     `json:"user_id"`
	Scope      TokenScope `json:"scope"`
	ValidUntil *string    `json:"validuntil"`
	CreatedAt  string     `json:"created_at"`
	Type       string     `json:"type"`
	Token      *string    `json:"token"`
}

type TokenCreateRequest

type TokenCreateRequest struct {
	UserId *string     `json:"user_id"`
	Scope  *TokenScope `json:"scope"`
	Title  string      `json:"title"`
}

type TokenListResponse

type TokenListResponse struct {
	Metadata   ResponseMetadata    `json:"metadata"`
	Pagination *ResponsePagination `json:"pagination"`
	Data       []Token             `json:"data"`
	Success    bool                `json:"success"`
	Messages   ResponseMessages    `json:"messages"`
}

type TokenScope

type TokenScope struct {
	ProjectId *string `json:"project_id"`
}

type TokenSingleResponse

type TokenSingleResponse struct {
	Metadata ResponseMetadata `json:"metadata"`
	Data     Token            `json:"data"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type TokenValidationInfo

type TokenValidationInfo struct {
	ProjectMemberships []ProjectMember `json:"project_memberships"`
	User               User            `json:"user"`
	Token              Token           `json:"token"`
}

type TokenValidationResponse

type TokenValidationResponse struct {
	Metadata ResponseMetadata    `json:"metadata"`
	Data     TokenValidationInfo `json:"data"`
	Success  bool                `json:"success"`
	Messages ResponseMessages    `json:"messages"`
}

type TransactionLogRequest

type TransactionLogRequest struct {
	Query interface{} `json:"query"`
	Limit *int        `json:"limit"`
	Sort  interface{} `json:"sort"`
}

type TransactionLogResponse

type TransactionLogResponse struct {
	Metadata ResponseMetadata `json:"metadata"`
	Data     []interface{}    `json:"data"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type User

type User struct {
	Gender     *Gender    `json:"gender"`
	LastName   string     `json:"last_name"`
	Id         string     `json:"id"`
	State      *UserState `json:"state"`
	CustomerId *string    `json:"customer_id"`
	Type       *UserType  `json:"type"`
	FirstName  string     `json:"first_name"`
	Email      string     `json:"email"`
}

type UserCreateRequest

type UserCreateRequest struct {
	Password  string    `json:"password"`
	Gender    Gender    `json:"gender"`
	LastName  string    `json:"last_name"`
	Company   *string   `json:"company"`
	Type      *UserType `json:"type"`
	FirstName string    `json:"first_name"`
	Email     string    `json:"email"`
}

type UserListResponse

type UserListResponse struct {
	Metadata   ResponseMetadata    `json:"metadata"`
	Pagination *ResponsePagination `json:"pagination"`
	Data       []User              `json:"data"`
	Success    bool                `json:"success"`
	Messages   ResponseMessages    `json:"messages"`
}

type UserSingleResponse

type UserSingleResponse struct {
	Metadata ResponseMetadata `json:"metadata"`
	Data     User             `json:"data"`
	Success  bool             `json:"success"`
	Messages ResponseMessages `json:"messages"`
}

type UserState

type UserState string

type UserType

type UserType string

type UserUpdateRequest

type UserUpdateRequest struct {
	Password   *string    `json:"password"`
	Gender     *Gender    `json:"gender"`
	LastName   *string    `json:"last_name"`
	Company    *string    `json:"company"`
	State      *UserState `json:"state"`
	Type       *UserType  `json:"type"`
	CustomerId *string    `json:"customer_id"`
	FirstName  *string    `json:"first_name"`
	Email      *string    `json:"email"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL