-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Resource access block (#249)
* WIP * updated project layout * fix linter * ignore sec warn * fix: re-generated docs * fix users test * added connector model * fix convertion graphql.ID to string * added connector tokens model * added group model * added remote-network model * fix fmt * added user model * fix fmt * WIP * added connectors pages * added featching all pages for groups * added featching all pages for resources * added featching all pages for users * updated test results location * wip: fixing tests * added generic paginated resource * added tests * renamed transport pkg to client * fixed tests * fix path to generated test coverage report * fix read resources * remove parallel resource tests * added debug log * debug error * debug error * fix test * remove logs * revert changes in ci.yml * simplify converters * added tests * added tests for models * fix fmt * added test coverage * added test coverage * added test coverage * fix test * added test coverage * run acc test * revert changes * added service-account resource * refactor acc tests * Fix http_max_retry doc * added service-account-key resource * regenerated docs * added example and gen docs * renamed resource: service-account -> service * update resource and fields name * fix acctest * fix acctest * wip * added acctests * renamed resource to twingate_service_account * renamed resource to twingate_service_account_key * added new datasource: twingate_service_accounts * added test coverage * added test coverage * added test coverage * added test coverage * added test coverage * added test coverage * updated doc description * updated docs * updated docs * updated docs * fix tests * fix PR comments * wip * wip: added access property to resource * wip * added access property * fix test * added new tests for resource access options * added new non-authoritative logic * added authoritative logic * added test coverage * added test coverage * added test coverage * added test coverage * added test coverage * fix fmt * added test coverage * added test coverage * fix test * fix test * fix docs * fix PR comments * fix docs --------- Co-authored-by: Eran Kampf <[email protected]>
- Loading branch information
Showing
32 changed files
with
3,928 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package attr | ||
|
||
const ( | ||
ID = "id" | ||
Name = "name" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package attr | ||
|
||
import "strings" | ||
|
||
const ( | ||
attrPathSeparator = ".0." | ||
attrLenSymbol = ".#" | ||
) | ||
|
||
func Path(attributes ...string) string { | ||
return strings.Join(attributes, attrPathSeparator) | ||
} | ||
|
||
func Len(attributes ...string) string { | ||
attr := Path(attributes...) | ||
|
||
if attr == "" { | ||
return "" | ||
} | ||
|
||
return attr + attrLenSymbol | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package attr | ||
|
||
const ( | ||
Access = "access" | ||
GroupIDs = "group_ids" | ||
ServiceAccountIDs = "service_account_ids" | ||
IsAuthoritative = "is_authoritative" | ||
Policy = "policy" | ||
Ports = "ports" | ||
Address = "address" | ||
RemoteNetworkID = "remote_network_id" | ||
Protocols = "protocols" | ||
AllowIcmp = "allow_icmp" | ||
TCP = "tcp" | ||
UDP = "udp" | ||
IsVisible = "is_visible" | ||
IsBrowserShortcutEnabled = "is_browser_shortcut_enabled" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package attr | ||
|
||
const ( | ||
ServiceAccountID = "service_account_id" | ||
Token = "token" | ||
) |
Oops, something went wrong.