Versions in this module Expand all Collapse all v0 v0.0.24 Nov 21, 2024 v0.0.23 Aug 15, 2024 v0.0.22 Jun 16, 2024 v0.0.21 May 23, 2024 v0.0.20 Mar 18, 2024 v0.0.19 Feb 12, 2024 Changes in this version + type Mutation struct + type Query struct + type Subscription struct v0.0.18 Dec 19, 2023 v0.0.17 Oct 22, 2023 v0.0.16 Oct 11, 2023 v0.0.15 Sep 15, 2023 v0.0.14 Sep 15, 2023 v0.0.13 Sep 8, 2023 v0.0.12 Sep 7, 2023 v0.0.11 Sep 6, 2023 Changes in this version + var ErrIDNotString = errors.New("ID is not a string") + var ErrUserNotFound = errors.New("user not found") + func CreatePeerInputToCreateOptions(input CreatePeerInput) *peer.CreateOptions + func CreateServerInputToCreateServerOptions(input CreateServerInput) (_ *server.CreateOptions, err error) + func CreateUserInputToUserCreateUserOptions(createUserInput CreateUserInput) *user.CreateOptions + func MarshalDateTime(t time.Time) graphql.Marshaler + func PeerHookInputToPeerHook(hook *PeerHookInput) *peer.Hook + func ServerHookInputToServerHook(hook *ServerHookInput) *server.Hook + func UnmarshalDateTime(v interface{}) (time.Time, error) + func UpdatePeerInputToUpdatePeerOptionsAndUpdatePeerFieldMask(input UpdatePeerInput) (options *peer.UpdateOptions, fieldMask *peer.UpdateFieldMask) + func UpdateServerInputToUpdateOptionsAndUpdateFieldMask(input UpdateServerInput) (options *server.UpdateOptions, fieldMask *server.UpdateFieldMask, err error) + func UpdateUserInputToUserUpdateUserOptions(input UpdateUserInput) (*user.UpdateOptions, *user.UpdateFieldMask, error) + func UserToContext(ctx context.Context, user *User, err error) context.Context + type CreatePeerInput struct + AllowedIPs []string + ClientMutationID graphql.Omittable[*string] + Description graphql.Omittable[*string] + Endpoint graphql.Omittable[*string] + Hooks graphql.Omittable[[]*PeerHookInput] + Name string + PersistentKeepalive graphql.Omittable[*int] + PresharedKey graphql.Omittable[*string] + PublicKey string + ServerID ID + type CreatePeerPayload struct + ClientMutationID *string + Peer *Peer + type CreateServerInput struct + Address string + ClientMutationID graphql.Omittable[*string] + DNS graphql.Omittable[[]string] + Description graphql.Omittable[*string] + Enabled graphql.Omittable[*bool] + FirewallMark graphql.Omittable[*int] + Hooks graphql.Omittable[[]*ServerHookInput] + ListenPort graphql.Omittable[*int] + Mtu graphql.Omittable[*int] + Name string + PrivateKey graphql.Omittable[*string] + PublicKey graphql.Omittable[*string] + type CreateServerPayload struct + ClientMutationID *string + Server *Server + type CreateUserInput struct + ClientMutationID graphql.Omittable[*string] + Email string + Password string + type CreateUserPayload struct + ClientMutationID *string + User *User + type DeletePeerInput struct + ClientMutationID graphql.Omittable[*string] + ID ID + type DeletePeerPayload struct + ClientMutationID *string + Peer *Peer + type DeleteServerInput struct + ClientMutationID graphql.Omittable[*string] + ID ID + type DeleteServerPayload struct + ClientMutationID *string + Server *Server + type DeleteUserInput struct + ClientMutationID graphql.Omittable[*string] + ID ID + type DeleteUserPayload struct + ClientMutationID *string + User *User + type ForeignInterface struct + Addresses []string + Mtu int + Name string + func ToForeignInterface(foreignInterface *wg.ForeignInterface) *ForeignInterface + type ForeignPeer struct + AllowedIps []string + Endpoint *string + LastHandshakeTime *time.Time + PersistentKeepAliveInterval int + ProtocolVersion int + PublicKey string + ReceiveBytes float64 + TransmitBytes float64 + func ToForeignPeer(foreignPeer *wg.ForeignPeer) *ForeignPeer + type ForeignServer struct + FirewallMark int + ForeignInterface *ForeignInterface + ListenPort int + Name string + Peers []*ForeignPeer + PublicKey string + Type string + func ToForeignServer(foreignServer *wg.ForeignServer) *ForeignServer + type GenerateWireguardKeyInput struct + ClientMutationID graphql.Omittable[*string] + type GenerateWireguardKeyPayload struct + ClientMutationID *string + PrivateKey string + PublicKey string + type ID struct + Kind IdKind + Value string + func StringID(idKind IdKind, id string) ID + func (id *ID) Base64() string + func (id *ID) String(idKind IdKind) (string, error) + func (id *ID) UnmarshalGQL(v interface{}) error + func (id *ID) Validate(idKind IdKind) error + func (id ID) Equal(other ID) bool + func (id ID) MarshalGQL(w io.Writer) + type IdKind string + const IdKindPeer + const IdKindServer + const IdKindUser + func (ik IdKind) String() string + type ImportForeignServerInput struct + ClientMutationID graphql.Omittable[*string] + Name string + type ImportForeignServerPayload struct + ClientMutationID *string + Server *Server + type Node interface + GetID func() ID + IsNode func() + type NodeChangedEvent interface + IsNodeChangedEvent func() + type Peer struct + AllowedIPs []string + CreateUser *User + CreatedAt time.Time + DeleteUser *User + DeletedAt *time.Time + Description string + Endpoint string + Hooks []*PeerHook + ID ID + Name string + PersistentKeepalive *int + PresharedKey string + PublicKey string + Server *Server + Stats *PeerStats + UpdateUser *User + UpdatedAt time.Time + func ToPeer(peer *peer.Peer) *Peer + func (Peer) IsNode() + func (this Peer) GetID() ID + type PeerChangedEvent struct + Action string + Node *Peer + func (PeerChangedEvent) IsNodeChangedEvent() + type PeerHook struct + Command string + RunOnCreate bool + RunOnDelete bool + RunOnUpdate bool + func ToPeerHook(hook *peer.Hook) *PeerHook + type PeerHookInput struct + Command string + RunOnCreate bool + RunOnDelete bool + RunOnUpdate bool + type PeerStats struct + LastHandshakeTime *time.Time + ProtocolVersion int + ReceiveBytes float64 + TransmitBytes float64 + func ToPeerStats(stats *wg.PeerStats) *PeerStats + type Server struct + Address string + CreateUser *User + CreatedAt time.Time + DNS []string + DeleteUser *User + DeletedAt *time.Time + Description string + Enabled bool + FirewallMark *int + Hooks []*ServerHook + ID ID + InterfaceStats *ServerInterfaceStats + ListenPort *int + Mtu int + Name string + Peers []*Peer + PublicKey string + Running bool + UpdateUser *User + UpdatedAt time.Time + func ToServer(server *server.Server) *Server + func (Server) IsNode() + func (this Server) GetID() ID + type ServerChangedEvent struct + Action string + Node *Server + func (ServerChangedEvent) IsNodeChangedEvent() + type ServerHook struct + Command string + RunOnCreate bool + RunOnDelete bool + RunOnStart bool + RunOnStop bool + RunOnUpdate bool + func ToServerHook(hook *server.Hook) *ServerHook + type ServerHookInput struct + Command string + RunOnCreate bool + RunOnDelete bool + RunOnStart bool + RunOnStop bool + RunOnUpdate bool + type ServerInterfaceStats struct + Collisions float64 + Multicast float64 + RxBytes float64 + RxCompressed float64 + RxCrcErrors float64 + RxDropped float64 + RxErrors float64 + RxFifoErrors float64 + RxFrameErrors float64 + RxLengthErrors float64 + RxMissedErrors float64 + RxOverErrors float64 + RxPackets float64 + TxAbortedErrors float64 + TxBytes float64 + TxCarrierErrors float64 + TxCompressed float64 + TxDropped float64 + TxErrors float64 + TxFifoErrors float64 + TxHeartbeatErrors float64 + TxPackets float64 + TxWindowErrors float64 + func ToServerInterfaceStats(stats server.Stats) *ServerInterfaceStats + type SignInInput struct + ClientMutationID graphql.Omittable[*string] + Email string + Password string + type SignInPayload struct + ClientMutationID *string + ExpiresAt time.Time + ExpiresIn int + Token string + type StartServerInput struct + ClientMutationID graphql.Omittable[*string] + ID ID + type StartServerPayload struct + ClientMutationID *string + Server *Server + type StopServerInput struct + ClientMutationID graphql.Omittable[*string] + ID ID + type StopServerPayload struct + ClientMutationID *string + Server *Server + type UpdatePeerInput struct + AllowedIPs graphql.Omittable[[]string] + ClientMutationID graphql.Omittable[*string] + Description graphql.Omittable[*string] + Endpoint graphql.Omittable[*string] + Hooks graphql.Omittable[[]*PeerHookInput] + ID ID + Name graphql.Omittable[*string] + PersistentKeepalive graphql.Omittable[*int] + PresharedKey graphql.Omittable[*string] + PublicKey graphql.Omittable[*string] + type UpdatePeerPayload struct + ClientMutationID *string + Peer *Peer + type UpdateServerInput struct + Address graphql.Omittable[*string] + ClientMutationID graphql.Omittable[*string] + DNS graphql.Omittable[[]string] + Description graphql.Omittable[*string] + Enabled graphql.Omittable[*bool] + FirewallMark graphql.Omittable[*int] + Hooks graphql.Omittable[[]*ServerHookInput] + ID ID + ListenPort graphql.Omittable[*int] + Mtu graphql.Omittable[*int] + PrivateKey graphql.Omittable[*string] + PublicKey graphql.Omittable[*string] + type UpdateServerPayload struct + ClientMutationID *string + Server *Server + type UpdateUserInput struct + ClientMutationID graphql.Omittable[*string] + Email graphql.Omittable[*string] + ID ID + Password graphql.Omittable[*string] + type UpdateUserPayload struct + ClientMutationID *string + User *User + type User struct + CreatedAt time.Time + Email string + ID ID + Peers []*Peer + Servers []*Server + UpdatedAt time.Time + func ContextToUser(ctx context.Context) (*User, error) + func ToUser(user *user.User) *User + func (User) IsNode() + func (this User) GetID() ID + type UserChangedEvent struct + Action string + Node *User + func (UserChangedEvent) IsNodeChangedEvent()