Documentation
¶
Index ¶
- func GetHandler(creds *pb.VCSCreds) (handler models.VCSHandler, token string, err error)
- func GetHandlerWithToken(ctx context.Context, accessToken string, subType pb.SubCredType) (handler models.VCSHandler, err error)
- func GetRemoteTranslator(sct pb.SubCredType) (models.Translator, error)
- func GetVCSSubTypeFromUrl(url string) (pb.SubCredType, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHandler ¶
func GetHandlerWithToken ¶
func GetHandlerWithToken(ctx context.Context, accessToken string, subType pb.SubCredType) (handler models.VCSHandler, err error)
GetHandlerWithToken will create an oauth2 client with the token, then return a handler instantiated with that oauth2 client.
This client is NOT configured to autorenew, as it doesn't have the client secret required to do so. It assumes a *STATIC* token source!!
func GetRemoteTranslator ¶
func GetRemoteTranslator(sct pb.SubCredType) (models.Translator, error)
GetRemoteTranslator is for getting a models.Translator for converting webhook post bodies to pr/push events
func GetVCSSubTypeFromUrl ¶
func GetVCSSubTypeFromUrl(url string) (pb.SubCredType, error)
GetVCSSubTypeFromUrl will parse the url given and figure out what vcs it originates from
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.